Comparing version 0.1.13 to 0.1.14
@@ -10,4 +10,8 @@ import {IsEqual} from './comparison'; | ||
TValue | ||
> = TKey extends keyof TObject | ||
? TObject[TKey] extends TValue ? TKey : never | ||
> = TObject extends object | ||
? TKey extends keyof TObject | ||
? TObject[TKey] extends TValue | ||
? TKey | ||
: never | ||
: never | ||
: never; | ||
@@ -24,4 +28,8 @@ | ||
TValue | ||
> = TKey extends keyof TObject | ||
? TObject[TKey] extends TValue ? never : TKey | ||
> = TObject extends object | ||
? TKey extends keyof TObject | ||
? TObject[TKey] extends TValue | ||
? never | ||
: TKey | ||
: never | ||
: never; | ||
@@ -38,4 +46,8 @@ | ||
TValue | ||
> = TKey extends keyof TObject | ||
? TValue extends TObject[TKey] ? TKey : never | ||
> = TObject extends object | ||
? TKey extends keyof TObject | ||
? TValue extends TObject[TKey] | ||
? TKey | ||
: never | ||
: never | ||
: never; | ||
@@ -52,4 +64,8 @@ | ||
TValue | ||
> = TKey extends keyof TObject | ||
? TValue extends TObject[TKey] ? never : TKey | ||
> = TObject extends object | ||
? TKey extends keyof TObject | ||
? TValue extends TObject[TKey] | ||
? never | ||
: TKey | ||
: never | ||
: never; | ||
@@ -68,4 +84,8 @@ | ||
TValue | ||
> = TKey extends keyof TObject | ||
? TObject[TKey] extends TValue ? TObject[TKey] : never | ||
> = TObject extends object | ||
? TKey extends keyof TObject | ||
? TObject[TKey] extends TValue | ||
? TObject[TKey] | ||
: never | ||
: never | ||
: never; | ||
@@ -83,4 +103,8 @@ | ||
TValue | ||
> = TKey extends keyof TObject | ||
? TObject[TKey] extends TValue ? never : TObject[TKey] | ||
> = TObject extends object | ||
? TKey extends keyof TObject | ||
? TObject[TKey] extends TValue | ||
? never | ||
: TObject[TKey] | ||
: never | ||
: never; | ||
@@ -97,4 +121,8 @@ | ||
TValue | ||
> = TKey extends keyof TObject | ||
? TValue extends TObject[TKey] ? TObject[TKey] : never | ||
> = TObject extends object | ||
? TKey extends keyof TObject | ||
? TValue extends TObject[TKey] | ||
? TObject[TKey] | ||
: never | ||
: never | ||
: never; | ||
@@ -111,4 +139,8 @@ | ||
TValue | ||
> = TKey extends keyof TObject | ||
? TValue extends TObject[TKey] ? never : TObject[TKey] | ||
> = TObject extends object | ||
? TKey extends keyof TObject | ||
? TValue extends TObject[TKey] | ||
? never | ||
: TObject[TKey] | ||
: never | ||
: never; | ||
@@ -124,3 +156,7 @@ | ||
TKey extends keyof TObject | ||
> = TKey extends keyof TObject ? TObject[TKey] : never; | ||
> = TObject extends object | ||
? TKey extends keyof TObject | ||
? TObject[TKey] | ||
: never | ||
: never; | ||
@@ -136,3 +172,3 @@ export type ValueNotOfKey< | ||
TObject extends object, | ||
TKey | ||
TKey extends keyof TObject | ||
> = TObject extends object | ||
@@ -144,3 +180,3 @@ ? Pick<TObject, Extract<keyof TObject, TKey>> | ||
TObject extends object, | ||
TKey | ||
TKey extends keyof TObject | ||
> = TObject extends object | ||
@@ -152,17 +188,29 @@ ? Pick<TObject, Exclude<keyof TObject, TKey>> | ||
export type KeepValueWithType<TObject extends object, TValue> = { | ||
[K in KeyOfValueWithType<TObject, TValue>]: TObject[K] | ||
}; | ||
export type KeepValueWithType< | ||
TObject extends object, | ||
TValue | ||
> = TObject extends object | ||
? {[K in KeyOfValueWithType<TObject, TValue>]: TObject[K]} | ||
: never; | ||
export type OmitValueWithType<TObject extends object, TValue> = { | ||
[K in KeyOfValueNotWithType<TObject, TValue>]: TObject[K] | ||
}; | ||
export type OmitValueWithType< | ||
TObject extends object, | ||
TValue | ||
> = TObject extends object | ||
? {[K in KeyOfValueNotWithType<TObject, TValue>]: TObject[K]} | ||
: never; | ||
export type KeepValueContainingType<TObject extends object, TValue> = { | ||
[K in KeyOfValueContainingType<TObject, TValue>]: TObject[K] | ||
}; | ||
export type KeepValueContainingType< | ||
TObject extends object, | ||
TValue | ||
> = TObject extends object | ||
? {[K in KeyOfValueContainingType<TObject, TValue>]: TObject[K]} | ||
: never; | ||
export type OmitValueContainingType<TObject extends object, TValue> = { | ||
[K in KeyOfValueNotContainingType<TObject, TValue>]: TObject[K] | ||
}; | ||
export type OmitValueContainingType< | ||
TObject extends object, | ||
TValue | ||
> = TObject extends object | ||
? {[K in KeyOfValueNotContainingType<TObject, TValue>]: TObject[K]} | ||
: never; | ||
@@ -191,3 +239,3 @@ // Optionalize values | ||
: T extends (infer U)[] | ||
? ReadonlyArray<__DeepReadonly<U>> | ||
: __DeepReadonly<T>; | ||
? ReadonlyArray<__DeepReadonly<U>> | ||
: __DeepReadonly<T>; |
{ | ||
"name": "tslang", | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"description": "TypeScript Language Type Utilities.", | ||
@@ -17,8 +17,8 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@magicspace/configs": "^0.1.46", | ||
"prettier": "^1.15.3", | ||
"tslint": "^5.12.1", | ||
"tslint-language-service": "^0.9.9", | ||
"typescript": "^3.2.4" | ||
"@magicspace/configs": "^0.1.49", | ||
"prettier": "^1.17.1", | ||
"tslint": "^5.17.0", | ||
"typescript": "^3.5.1", | ||
"typescript-tslint-plugin": "^0.4.0" | ||
} | ||
} |
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
6939
218