Sha256: cff30d408c70b3335ad71e804eab6d78090c26b7f221345f908cdc53477c24ba
Contents?: true
Size: 757 Bytes
Versions: 26
Compression:
Stored size: 757 Bytes
Contents
type Fn = (...arg: any[]) => any export type MaybePromise<T> = T | Promise<T> export type RequiredDeep< Type, U extends Record<string, unknown> | Fn | undefined = undefined, > = Type extends Fn ? Type : /** * @note The "Fn" type satisfies the predicate below. * It must always come first, before the Record check. */ Type extends Record<string, any> ? { [Key in keyof Type]-?: NonNullable<Type[Key]> extends NonNullable<U> ? NonNullable<Type[Key]> : RequiredDeep<NonNullable<Type[Key]>, U> } : Type /** * @fixme Remove this once TS 5.4 is the lowest supported version. * Because "NoInfer" is a built-in type utility there. */ export type NoInfer<T> = [T][T extends any ? 0 : never]
Version data entries
26 entries across 26 versions & 1 rubygems