Skip to content

Commit feb529e

Browse files
author
jyoes
committed
Fix CustomCommandArgs inference
1 parent 743b657 commit feb529e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/reactotron-core-client/src/reactotron-core-client.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,14 @@ export interface CustomCommandArg {
141141
type: ArgType
142142
}
143143

144+
interface ArgTypeMap {
145+
[ArgType.String]: string
146+
}
147+
144148
export type CustomCommandArgs<Args extends CustomCommandArg[]> = UnionToIntersection<
145149
Args extends Array<infer U>
146150
? U extends CustomCommandArg
147-
? { [K in U as U["name"]]: U["type"] }
151+
? { [K in U as U["name"]]: ArgTypeMap[U["type"]] }
148152
: never
149153
: never
150154
>

0 commit comments

Comments
 (0)