type-plus
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -1,6 +0,2 @@ | ||
export declare type RequiredPick<T, U extends keyof T> = { | ||
[P in U]-?: Exclude<T[P], undefined>; | ||
} & Pick<T, Exclude<keyof T, U>>; | ||
export declare type RequiredExcept<T, U extends keyof T> = { | ||
[P in Exclude<keyof T, U>]-?: Exclude<T[P], undefined>; | ||
} & Pick<T, U>; | ||
export declare type RequiredPick<T, U extends keyof T> = Required<Pick<T, U>> & Pick<T, Exclude<keyof T, U>>; | ||
export declare type RequiredExcept<T, U extends keyof T> = Required<Pick<T, Exclude<keyof T, U>>> & Pick<T, U>; |
{ | ||
"name": "type-plus", | ||
"description": "Provides additional types for `typescript`.", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"homepage": "https://github.com/unional/type-plus", | ||
@@ -6,0 +6,0 @@ "bugs": { |
@@ -1,7 +0,3 @@ | ||
export type PartialPick<T, U extends keyof T> = { | ||
[P in keyof T]: P extends U ? T[P] | undefined : T[P] | ||
} | ||
export type PartialPick<T, U extends keyof T> = Pick<T, Exclude<keyof T, U>> & Partial<Pick<T, U>> | ||
export type PartialExcept<T, U extends keyof T> = { | ||
[P in keyof T]: P extends U ? T[P] : T[P] | undefined | ||
} | ||
export type PartialExcept<T, U extends keyof T> = Pick<T, U> & Partial<Pick<T, Exclude<keyof T, U>>> |
// Thanks [jack-williams](https://github.com/jack-williams) for the [solution](https://github.com/Microsoft/TypeScript/issues/29269#issuecomment-451602962) | ||
export type RequiredPick<T, U extends keyof T> = { | ||
[P in U]-?: Exclude<T[P], undefined> | ||
} & Pick<T, Exclude<keyof T, U>> | ||
export type RequiredPick<T, U extends keyof T> = Required<Pick<T, U>> & Pick<T, Exclude<keyof T, U>> | ||
export type RequiredExcept<T, U extends keyof T> = { | ||
[P in Exclude<keyof T, U>]-?: Exclude<T[P], undefined> | ||
} & Pick<T, U> | ||
export type RequiredExcept<T, U extends keyof T> = Required<Pick<T, Exclude<keyof T, U>>> & Pick<T, U> |
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
29980
545