chore(types): convert type literals to records (#1615)

This commit is contained in:
Stanislav
2020-07-19 05:56:28 +03:00
committed by GitHub
parent b8db7ab889
commit fa5ddf8d06
5 changed files with 5 additions and 5 deletions

View File

@@ -80,7 +80,7 @@ type InferPropType<T> = T extends null
: T extends { type: null | true }
? any // As TS issue https://github.com/Microsoft/TypeScript/issues/14829 // somehow `ObjectConstructor` when inferred from { (): T } becomes `any` // `BooleanConstructor` when inferred from PropConstructor(with PropMethod) becomes `Boolean`
: T extends ObjectConstructor | { type: ObjectConstructor }
? { [key: string]: any }
? Record<string, any>
: T extends BooleanConstructor | { type: BooleanConstructor }
? boolean
: T extends Prop<infer V> ? V : T