Comparing version 1.4.0 to 1.5.0
@@ -20,3 +20,3 @@ import {Builtin} from './common'; | ||
: T extends (infer U)[] ? DeepPartial<U>[] | ||
: { [P in keyof T]?: DeepPartial<T[P]> }; | ||
: { [P in keyof T]?: DeepPartial<Exclude<T[P], undefined>> }; | ||
@@ -38,3 +38,3 @@ /** | ||
: T extends (infer U)[] ? DeepBuildable<U>[] | ||
: { -readonly [P in keyof T]?: DeepBuildable<T[P]> }; | ||
: { -readonly [P in keyof T]?: DeepBuildable<Exclude<T[P], undefined>> }; | ||
@@ -56,3 +56,3 @@ /** | ||
: T extends (infer U)[] ? DeepRequired<U>[] | ||
: { [P in keyof T]-?: DeepRequired<T[P]> }; | ||
: { [P in keyof T]-?: DeepRequired<Exclude<T[P], undefined>> }; | ||
@@ -75,3 +75,3 @@ | ||
: T extends (infer U)[] ? DeepReadonly<U>[] | ||
: { readonly [P in keyof T]: DeepReadonly<T[P]> }; | ||
: { readonly [P in keyof T]: DeepReadonly<Exclude<T[P], undefined>> }; | ||
@@ -93,3 +93,3 @@ /** | ||
: T extends (infer U)[] ? DeepWritable<U>[] | ||
: { -readonly [P in keyof T]: DeepWritable<T[P]> }; | ||
: { -readonly [P in keyof T]: DeepWritable<Exclude<T[P], undefined>> }; | ||
@@ -111,2 +111,2 @@ /** | ||
: T extends (infer U)[] ? DeepNullish<U>[] | null | undefined | ||
: { [P in keyof T]: DeepNullish<T[P]> | null | undefined }; | ||
: { [P in keyof T]: DeepNullish<Exclude<T[P], undefined>> | null | undefined }; |
@@ -1,3 +0,3 @@ | ||
import {Builtin} from './common'; | ||
import {IfTuple} from './type-check'; | ||
import {Builtin, Type} from './common'; | ||
import {IfClass, IfTuple} from './type-check'; | ||
import {JsonKeys, OptionalKeys, ReadonlyKeys, RequiredKeys, WritableKeys} from './keys'; | ||
@@ -20,3 +20,3 @@ | ||
: T extends (infer U)[] ? DeepPickOptional<U>[] | ||
: { [P in K]?: DeepPickOptional<T[P]> }; | ||
: { [P in K]?: DeepPickOptional<Exclude<T[P], undefined>> }; | ||
@@ -38,3 +38,3 @@ /** | ||
: T extends (infer U)[] ? DeepPickRequired<U>[] | ||
: { [P in J]: DeepPickRequired<T[P]> }; | ||
: { [P in J]: DeepPickRequired<Exclude<T[P], undefined>> }; | ||
@@ -56,3 +56,3 @@ /** | ||
: T extends (infer U)[] ? DeepPickReadonly<U>[] | ||
: { [P in J]: DeepPickReadonly<T[P]> }; | ||
: { [P in J]: DeepPickReadonly<Exclude<T[P], undefined>> }; | ||
@@ -73,4 +73,5 @@ /** | ||
: IfTuple<T> extends true ? { [K in OptionalKeys<T>]?: DeepPickWritable<T[K]> } | ||
: T extends (infer U)[] ? DeepPickWritable<U>[] | ||
: { [P in K]: DeepPickWritable<T[P]> } | ||
: IfClass<T> extends true ? DeepPickWritable<Type<T>> | ||
: T extends (infer U)[] ? DeepPickWritable<U>[] | ||
: { [P in K]: DeepPickWritable<Exclude<T[P], undefined>> } | ||
@@ -92,3 +93,3 @@ /** | ||
: T extends (infer U)[] ? DeepPickJson<U>[] | ||
: { [P in Keys]: DeepPickJson<T[P]> }; | ||
: { [P in Keys]: DeepPickJson<Exclude<T[P], undefined>> }; | ||
@@ -111,2 +112,2 @@ | ||
: T extends (infer U)[] ? DeepPickWritableJson<U>[] | ||
: { [P in Keys]: DeepPickWritableJson<T[P]> }; | ||
: { [P in Keys]: DeepPickWritableJson<Exclude<T[P], undefined>> }; |
@@ -15,3 +15,3 @@ { | ||
], | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"types": "lib/index.d.ts", | ||
@@ -18,0 +18,0 @@ "repository": "git@github.com:panates/ts-gems.git", |
32666
625