Comparing version 2.7.1 to 2.7.2
@@ -1,2 +0,2 @@ | ||
import { IfEquals, IfCompatible, IfUndefined, IfAny, IfJson } from './type-check'; | ||
import { IfEquals, IfCompatible, IfUndefined, IfAny, IfJson, IfNull } from './type-check'; | ||
@@ -21,5 +21,5 @@ /** | ||
export type _RequiredKeys<T> = { | ||
[K in keyof T]-?: IfUndefined<T[K]> extends true | ||
? never | ||
: T extends { [K1 in K]: any } ? K : never | ||
[K in keyof T]-?: IfUndefined<T[K]> extends true ? never | ||
: T extends { [K1 in K]: any } ? K | ||
: never | ||
}[keyof T]; | ||
@@ -33,5 +33,5 @@ | ||
export type _OptionalKeys<T> = { | ||
[K in keyof T]-?: IfUndefined<T[K]> extends true | ||
? never | ||
: T extends { [K1 in K]: any } ? never : K | ||
[K in keyof T]-?: IfUndefined<T[K]> extends true ? never | ||
: T extends { [K1 in K]: any } ? never | ||
: K | ||
}[keyof T]; | ||
@@ -54,6 +54,4 @@ | ||
[K in keyof J]: K extends symbol ? never | ||
: IfUndefined<J[K]> extends true | ||
? never | ||
: IfJson<J[K]> extends true | ||
? K | ||
: IfNull<J[K]> extends true ? K | ||
: IfJson<Exclude<J[K], undefined>> extends true ? K | ||
: never | ||
@@ -83,4 +81,4 @@ | ||
[K in keyof T]-?: IfUndefined<T[K]> extends false ? | ||
IfAny<T[K]> extends false ? | ||
T[K] extends Function ? K | ||
IfAny<T[K]> extends false | ||
? T[K] extends Function ? K | ||
: never : never : never; | ||
@@ -92,6 +90,6 @@ }>; | ||
*/ | ||
export type NonFunctionKeys<T> = ValuesOf<{ | ||
export type NonFunctionKeys<T> = ValuesOf<{ | ||
[K in keyof T]-?: IfUndefined<T[K]> extends false ? | ||
IfAny<T[K]> extends false ? | ||
T[K] extends Function ? never | ||
IfAny<T[K]> extends false | ||
? T[K] extends Function ? never | ||
: K : K : K; | ||
@@ -101,3 +99,2 @@ }>; | ||
/** | ||
@@ -104,0 +101,0 @@ * @desc Returns keys that match given type |
@@ -1,2 +0,2 @@ | ||
import {Primitive, Type} from './common'; | ||
import { Primitive, Type } from './common'; | ||
@@ -3,0 +3,0 @@ type NonObj = Primitive | Function; |
@@ -15,3 +15,3 @@ { | ||
], | ||
"version": "2.7.1", | ||
"version": "2.7.2", | ||
"types": "lib/index.d.ts", | ||
@@ -36,8 +36,8 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@types/jest": "^29.5.4", | ||
"eslint": "^8.49.0", | ||
"@types/jest": "^29.5.11", | ||
"eslint": "^8.55.0", | ||
"jest": "^29.7.0", | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^5.2.2" | ||
"typescript": "^5.3.3" | ||
} | ||
} |
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
26513
665