Comparing version 2.9.1 to 2.9.2
@@ -0,3 +1,3 @@ | ||
import { DeepOmitNever, HighDeepOmitNever } from './deep-omit.js'; | ||
import { IfNoDeepValue } from './helpers.js'; | ||
import { OmitNever } from './omit.js'; | ||
@@ -7,6 +7,6 @@ /** | ||
*/ | ||
export type DeepBuildable<T> = _DeepBuildable<T>; | ||
export type DeepBuildable<T> = DeepOmitNever<_DeepBuildable<T>>; | ||
type _DeepBuildable<T> = | ||
IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ -readonly [P in keyof T]?: _DeepBuildable<Exclude<T[P], undefined>> }>; | ||
: { -readonly [P in keyof T]?: _DeepBuildable<Exclude<T[P], undefined>> }; | ||
@@ -16,3 +16,3 @@ /** | ||
*/ | ||
export type HighDeepBuildable<T> = _HighDeepBuildable<T>; | ||
export type HighDeepBuildable<T> = HighDeepOmitNever<_HighDeepBuildable<T>>; | ||
type _HighDeepBuildable<T> = | ||
@@ -22,2 +22,2 @@ T extends (infer U)[] ? _HighDeepBuildable<U>[] | ||
: T extends (infer U)[] ? _HighDeepBuildable<U>[] | ||
: OmitNever<{ -readonly [P in keyof T]?: _HighDeepBuildable<Exclude<T[P], undefined>> }>; | ||
: { -readonly [P in keyof T]?: _HighDeepBuildable<Exclude<T[P], undefined>> }; |
import { IfNoDeepValue } from './helpers.js'; | ||
import { OptionalKeys, ReadonlyKeys, RequiredKeys, WritableKeys } from './keys'; | ||
import { OmitNever } from './omit.js'; | ||
@@ -8,6 +7,6 @@ /** | ||
*/ | ||
export type DeepOmitOptional<T> = _DeepOmitOptional<Exclude<T, undefined>>; | ||
export type DeepOmitOptional<T> = DeepOmitNever<_DeepOmitOptional<T>>; | ||
type _DeepOmitOptional<T, K extends keyof T = Exclude<keyof T, OptionalKeys<T>>> = | ||
IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in K]-?: DeepOmitOptional<T[P]> }>; | ||
: { [P in K]-?: _DeepOmitOptional<Exclude<T[P], undefined>> }; | ||
@@ -17,7 +16,7 @@ /** | ||
*/ | ||
export type HighDeepOmitOptional<T> = _HighDeepOmitOptional<Exclude<T, undefined>>; | ||
export type HighDeepOmitOptional<T> = HighDeepOmitNever<_HighDeepOmitOptional<T>>; | ||
type _HighDeepOmitOptional<T, K extends keyof T = Exclude<keyof T, OptionalKeys<T>>> = | ||
T extends (infer U)[] ? HighDeepOmitOptional<U>[] | ||
T extends (infer U)[] ? _HighDeepOmitOptional<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in K]-?: HighDeepOmitOptional<T[P]> }>; | ||
: { [P in K]-?: _HighDeepOmitOptional<Exclude<T[P], undefined>> }; | ||
@@ -28,6 +27,6 @@ | ||
*/ | ||
export type DeepOmitRequired<T> = _DeepOmitRequired<Exclude<T, undefined>>; | ||
export type DeepOmitRequired<T> = DeepOmitNever<_DeepOmitRequired<T>>; | ||
type _DeepOmitRequired<T, J extends keyof T = Exclude<keyof T, RequiredKeys<T>>> = | ||
IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in J]?: DeepOmitRequired<Exclude<T[P], undefined>> }>; | ||
: { [P in J]?: _DeepOmitRequired<Exclude<T[P], undefined>> }; | ||
@@ -38,7 +37,7 @@ | ||
*/ | ||
export type HighDeepOmitRequired<T> = _HighDeepOmitRequired<Exclude<T, undefined>>; | ||
export type HighDeepOmitRequired<T> = HighDeepOmitNever<_HighDeepOmitRequired<T>>; | ||
type _HighDeepOmitRequired<T, J extends keyof T = Exclude<keyof T, RequiredKeys<T>>> = | ||
T extends (infer U)[] ? HighDeepOmitRequired<U>[] | ||
T extends (infer U)[] ? _HighDeepOmitRequired<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in J]?: HighDeepOmitRequired<Exclude<T[P], undefined>> }>; | ||
: { [P in J]?: _HighDeepOmitRequired<Exclude<T[P], undefined>> }; | ||
@@ -49,6 +48,6 @@ | ||
*/ | ||
export type DeepOmitReadonly<T> = _DeepOmitReadonly<Exclude<T, undefined>>; | ||
export type DeepOmitReadonly<T> = DeepOmitNever<_DeepOmitReadonly<Exclude<T, undefined>>>; | ||
type _DeepOmitReadonly<T, J extends keyof T = Exclude<keyof T, ReadonlyKeys<T>>> = | ||
IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in J]: DeepOmitReadonly<T[P]> }>; | ||
: { [P in J]: _DeepOmitReadonly<Exclude<T[P], undefined>> }; | ||
@@ -59,7 +58,7 @@ | ||
*/ | ||
export type HighDeepOmitReadonly<T> = _HighDeepOmitReadonly<Exclude<T, undefined>>; | ||
export type HighDeepOmitReadonly<T> = HighDeepOmitNever<_HighDeepOmitReadonly<T>>; | ||
type _HighDeepOmitReadonly<T, J extends keyof T = Exclude<keyof T, ReadonlyKeys<T>>> = | ||
T extends (infer U)[] ? HighDeepOmitReadonly<U>[] | ||
T extends (infer U)[] ? _HighDeepOmitReadonly<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in J]: HighDeepOmitReadonly<T[P]> }>; | ||
: { [P in J]: _HighDeepOmitReadonly<Exclude<T[P], undefined>> }; | ||
@@ -70,6 +69,6 @@ | ||
*/ | ||
export type DeepOmitWritable<T> = _DeepOmitWritable<Exclude<T, undefined>> | ||
export type DeepOmitWritable<T> = DeepOmitNever<_DeepOmitWritable<T>> | ||
type _DeepOmitWritable<T, K extends keyof T = Exclude<keyof T, WritableKeys<T>>> = | ||
IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ readonly [P in K]: DeepOmitWritable<T[P]> }> | ||
: { readonly [P in K]: _DeepOmitWritable<Exclude<T[P], undefined>> } | ||
@@ -80,7 +79,7 @@ | ||
*/ | ||
export type HighDeepOmitWritable<T> = _HighDeepOmitWritable<Exclude<T, undefined>> | ||
export type HighDeepOmitWritable<T> = HighDeepOmitNever<_HighDeepOmitWritable<T>> | ||
type _HighDeepOmitWritable<T, K extends keyof T = Exclude<keyof T, WritableKeys<T>>> = | ||
T extends (infer U)[] ? HighDeepOmitWritable<U>[] | ||
T extends (infer U)[] ? _HighDeepOmitWritable<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ readonly [P in K]: HighDeepOmitWritable<T[P]> }> | ||
: { readonly [P in K]: _HighDeepOmitWritable<Exclude<T[P], undefined>> } | ||
@@ -90,6 +89,6 @@ /** | ||
*/ | ||
export type DeepOmitNever<T> = _DeepOmitNever<Exclude<T, undefined>> | ||
export type DeepOmitNever<T> = _DeepOmitNever<T> | ||
type _DeepOmitNever<T> = | ||
IfNoDeepValue<T> extends true ? T | ||
: { [P in keyof T as (Exclude<T[P], undefined> extends never ? never : P)]: DeepOmitNever<T[P]> } | ||
: { [P in keyof T as (Exclude<T[P], undefined> extends never ? never : P)]: _DeepOmitNever<Exclude<T[P], undefined>> } | ||
@@ -100,6 +99,6 @@ | ||
*/ | ||
export type HighDeepOmitNever<T> = _HighDeepOmitNever<Exclude<T, undefined>> | ||
export type HighDeepOmitNever<T> = _HighDeepOmitNever<T> | ||
type _HighDeepOmitNever<T> = | ||
T extends (infer U)[] ? HighDeepOmitNever<U>[] | ||
T extends (infer U)[] ? _HighDeepOmitNever<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: { [P in keyof T as (Exclude<T[P], undefined> extends never ? never : P)]: HighDeepOmitNever<T[P]> } | ||
: { [P in keyof T as (Exclude<T[P], undefined> extends never ? never : P)]: _HighDeepOmitNever<Exclude<T[P], undefined>> } |
@@ -0,4 +1,4 @@ | ||
import { DeepOmitNever, HighDeepOmitNever } from './deep-omit.js'; | ||
import { IfNoDeepValue } from './helpers.js'; | ||
import { JsonKeys, OptionalKeys, ReadonlyKeys, RequiredKeys, WritableKeys } from './keys'; | ||
import { OmitNever } from './omit.js'; | ||
@@ -8,6 +8,6 @@ /** | ||
*/ | ||
export type DeepPickOptional<T> = _DeepPickOptional<Exclude<T, undefined>>; | ||
export type DeepPickOptional<T> = DeepOmitNever<_DeepPickOptional<T>>; | ||
type _DeepPickOptional<T, K extends keyof T = OptionalKeys<T>> = | ||
IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in K]?: DeepPickOptional<T[P]> }>; | ||
: { [P in K]?: _DeepPickOptional<Exclude<T[P], undefined>> }; | ||
@@ -17,7 +17,7 @@ /** | ||
*/ | ||
export type HighDeepPickOptional<T> = _HighDeepPickOptional<Exclude<T, undefined>>; | ||
export type HighDeepPickOptional<T> = HighDeepOmitNever<_HighDeepPickOptional<T>>; | ||
type _HighDeepPickOptional<T, K extends keyof T = OptionalKeys<T>> = | ||
T extends (infer U)[] ? HighDeepPickOptional<U>[] | ||
T extends (infer U)[] ? _HighDeepPickOptional<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in K]?: HighDeepPickOptional<T[P]> }>; | ||
: { [P in K]?: _HighDeepPickOptional<Exclude<T[P], undefined>> }; | ||
@@ -28,6 +28,6 @@ | ||
*/ | ||
export type DeepPickRequired<T> = _DeepPickRequired<Exclude<T, undefined>>; | ||
export type DeepPickRequired<T> = DeepOmitNever<_DeepPickRequired<T>>; | ||
type _DeepPickRequired<T, J extends keyof T = RequiredKeys<T>> = | ||
IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in J]-?: DeepPickRequired<T[P]> }>; | ||
: { [P in J]-?: _DeepPickRequired<Exclude<T[P], undefined>> }; | ||
@@ -38,7 +38,7 @@ | ||
*/ | ||
export type HighDeepPickRequired<T> = _HighDeepPickRequired<Exclude<T, undefined>>; | ||
export type HighDeepPickRequired<T> = HighDeepOmitNever<_HighDeepPickRequired<T>>; | ||
type _HighDeepPickRequired<T, J extends keyof T = RequiredKeys<T>> = | ||
T extends (infer U)[] ? HighDeepPickRequired<U>[] | ||
T extends (infer U)[] ? _HighDeepPickRequired<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in J]-?: HighDeepPickRequired<T[P]> }>; | ||
: { [P in J]-?: _HighDeepPickRequired<Exclude<T[P], undefined>> }; | ||
@@ -49,6 +49,6 @@ | ||
*/ | ||
export type DeepPickReadonly<T> = _DeepPickReadonly<Exclude<T, undefined>>; | ||
export type DeepPickReadonly<T> = DeepOmitNever<_DeepPickReadonly<T>>; | ||
type _DeepPickReadonly<T, K extends keyof T = ReadonlyKeys<T>> = | ||
IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in K]: DeepPickReadonly<T[P]> }>; | ||
: { [P in K]: _DeepPickReadonly<Exclude<T[P], undefined>> }; | ||
@@ -58,7 +58,7 @@ /** | ||
*/ | ||
export type HighDeepPickReadonly<T> = _HighDeepPickReadonly<Exclude<T, undefined>>; | ||
export type HighDeepPickReadonly<T> = HighDeepOmitNever<_HighDeepPickReadonly<T>>; | ||
type _HighDeepPickReadonly<T, K extends keyof T = ReadonlyKeys<T>> = | ||
T extends (infer U)[] ? HighDeepPickReadonly<U>[] | ||
T extends (infer U)[] ? _HighDeepPickReadonly<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in K]: HighDeepPickReadonly<T[P]> }>; | ||
: { [P in K]: _HighDeepPickReadonly<Exclude<T[P], undefined>> }; | ||
@@ -69,6 +69,6 @@ | ||
*/ | ||
export type DeepPickWritable<T> = _DeepPickWritable<Exclude<T, undefined>>; | ||
export type DeepPickWritable<T> = DeepOmitNever<_DeepPickWritable<T>>; | ||
type _DeepPickWritable<T, K extends keyof T = WritableKeys<T>> = | ||
IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in K]: DeepPickWritable<T[P]> }>; | ||
: { [P in K]: _DeepPickWritable<Exclude<T[P], undefined>> }; | ||
@@ -78,7 +78,7 @@ /** | ||
*/ | ||
export type HighDeepPickWritable<T> = _HighDeepPickWritable<Exclude<T, undefined>>; | ||
export type HighDeepPickWritable<T> = HighDeepOmitNever<_HighDeepPickWritable<T>>; | ||
type _HighDeepPickWritable<T, K extends keyof T = WritableKeys<T>> = | ||
T extends (infer U)[] ? HighDeepPickWritable<U>[] | ||
T extends (infer U)[] ? _HighDeepPickWritable<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in K]: HighDeepPickWritable<T[P]> }>; | ||
: { [P in K]: _HighDeepPickWritable<Exclude<T[P], undefined>> }; | ||
@@ -89,6 +89,6 @@ | ||
*/ | ||
export type DeepPickJson<T> = _DeepPickJson<Exclude<T, undefined>>; | ||
export type DeepPickJson<T> = DeepOmitNever<_DeepPickJson<T>>; | ||
type _DeepPickJson<T, Keys extends keyof T = JsonKeys<T>> = | ||
T extends (infer U)[] ? DeepPickJson<U>[] | ||
T extends (infer U)[] ? _DeepPickJson<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in Keys]: DeepPickJson<T[P]> }>; | ||
: { [P in Keys]: _DeepPickJson<Exclude<T[P], undefined>> }; |
@@ -0,3 +1,3 @@ | ||
import { DeepOmitNever, HighDeepOmitNever } from './deep-omit.js'; | ||
import { IfNoDeepValue } from './helpers.js'; | ||
import { OmitNever } from './omit.js'; | ||
@@ -7,6 +7,6 @@ /** | ||
*/ | ||
export type DeepReadonly<T> = _DeepReadonly<T>; | ||
export type DeepReadonly<T> = DeepOmitNever<_DeepReadonly<T>>; | ||
type _DeepReadonly<T> = | ||
IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ readonly [P in keyof T]: _DeepReadonly<T[P]> }>; | ||
: { readonly [P in keyof T]: _DeepReadonly<T[P]> }; | ||
@@ -16,7 +16,7 @@ /** | ||
*/ | ||
export type HighDeepReadonly<T> = _HighDeepReadonly<T>; | ||
export type HighDeepReadonly<T> = HighDeepOmitNever<_HighDeepReadonly<T>>; | ||
type _HighDeepReadonly<T> = | ||
T extends (infer U)[] ? _HighDeepReadonly<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ readonly [P in keyof T]: _HighDeepReadonly<T[P]> }>; | ||
: { readonly [P in keyof T]: _HighDeepReadonly<T[P]> }; | ||
@@ -0,3 +1,3 @@ | ||
import { DeepOmitNever, HighDeepOmitNever } from './deep-omit.js'; | ||
import { IfNoDeepValue } from './helpers.js'; | ||
import { OmitNever } from './omit.js'; | ||
@@ -7,6 +7,6 @@ /** | ||
*/ | ||
export type DeepRequired<T> = _DeepRequired<T>; | ||
export type DeepRequired<T> = DeepOmitNever<_DeepRequired<T>>; | ||
type _DeepRequired<T> = | ||
IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in keyof T]-?: _DeepRequired<Exclude<T[P], undefined>> }>; | ||
: { [P in keyof T]-?: _DeepRequired<Exclude<T[P], undefined>> }; | ||
@@ -17,6 +17,6 @@ | ||
*/ | ||
export type HighDeepRequired<T> = _HighDeepRequired<T>; | ||
export type HighDeepRequired<T> = HighDeepOmitNever<_HighDeepRequired<T>>; | ||
type _HighDeepRequired<T> = | ||
T extends (infer U)[] ? _HighDeepRequired<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ [P in keyof T]-?: _HighDeepRequired<Exclude<T[P], undefined>> }>; | ||
: { [P in keyof T]-?: _HighDeepRequired<Exclude<T[P], undefined>> }; |
@@ -0,3 +1,3 @@ | ||
import { DeepOmitNever, HighDeepOmitNever } from './deep-omit.js'; | ||
import { IfNoDeepValue } from './helpers.js'; | ||
import { OmitNever } from './omit.js'; | ||
@@ -7,6 +7,6 @@ /** | ||
*/ | ||
export type DeepWritable<T> = _DeepWritable<T>; | ||
export type DeepWritable<T> = DeepOmitNever<_DeepWritable<T>>; | ||
type _DeepWritable<T> = | ||
IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ -readonly [P in keyof T]: _DeepWritable<T[P]> }>; | ||
: { -readonly [P in keyof T]: _DeepWritable<T[P]> }; | ||
@@ -17,6 +17,6 @@ | ||
*/ | ||
export type HighDeepWritable<T> = _HighDeepWritable<T>; | ||
export type HighDeepWritable<T> = HighDeepOmitNever<_HighDeepWritable<T>>; | ||
type _HighDeepWritable<T> = | ||
T extends (infer U)[] ? _HighDeepWritable<U>[] | ||
: IfNoDeepValue<T> extends true ? T | ||
: OmitNever<{ -readonly [P in keyof T]: _HighDeepWritable<T[P]> }>; | ||
: { -readonly [P in keyof T]: _HighDeepWritable<T[P]> }; |
@@ -15,3 +15,3 @@ { | ||
], | ||
"version": "2.9.1", | ||
"version": "2.9.2", | ||
"types": "lib/index.d.ts", | ||
@@ -18,0 +18,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30135
756