type-plus
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -1,2 +0,2 @@ | ||
export declare function findKey<T>(subject: T, predicate: (this: void, key: keyof T, index: number, obj: string[]) => key is keyof T, thisArg?: any): string | undefined; | ||
export declare function findKey<T>(subject: T, predicate: (key: keyof T, index: number, obj: string[]) => boolean, thisArg?: any): string | undefined; | ||
export declare function findKey<T>(subject: T, predicate: (this: void, key: keyof T, index: number, obj: (keyof T)[]) => key is keyof T, thisArg?: any): keyof T | undefined; | ||
export declare function findKey<T>(subject: T, predicate: (key: keyof T, index: number, obj: (keyof T)[]) => boolean, thisArg?: any): keyof TypeError | undefined; |
@@ -1,1 +0,1 @@ | ||
export declare function mapKey<R = {}, T = {}>(subject: T, callbackfn: (key: keyof T, index: number, obj: string[]) => R, thisArg?: any): {}[]; | ||
export declare function mapKey<R, T>(subject: T, callbackfn: (key: keyof T, index: number, obj: string[]) => R, thisArg?: any): R[]; |
{ | ||
"name": "type-plus", | ||
"description": "Provides additional types for `typescript`.", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"homepage": "https://github.com/unional/type-plus", | ||
@@ -6,0 +6,0 @@ "bugs": { |
@@ -1,5 +0,5 @@ | ||
export function findKey<T>(subject: T, predicate: (this: void, key: keyof T, index: number, obj: string[]) => key is keyof T, thisArg?: any): string | undefined | ||
export function findKey<T>(subject: T, predicate: (key: keyof T, index: number, obj: string[]) => boolean, thisArg?: any): string | undefined | ||
export function findKey<T>(subject: T, predicate: (this: void, key: keyof T, index: number, obj: (keyof T)[]) => key is keyof T, thisArg?: any): keyof T | undefined | ||
export function findKey<T>(subject: T, predicate: (key: keyof T, index: number, obj: (keyof T)[]) => boolean, thisArg?: any): keyof TypeError | undefined | ||
export function findKey<T>(subject: T, predicate: any, thisArg?: any) { | ||
return Object.keys(subject).find(predicate, thisArg) | ||
} |
@@ -1,3 +0,3 @@ | ||
export function mapKey<R = {}, T = {}>(subject: T, callbackfn: (key: keyof T, index: number, obj: string[]) => R, thisArg?: any) { | ||
export function mapKey<R, T>(subject: T, callbackfn: (key: keyof T, index: number, obj: string[]) => R, thisArg?: any): R[] { | ||
return Object.keys(subject).map(callbackfn as any, thisArg) | ||
} |
Sorry, the diff of this file is not supported yet
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
18900