@types/for-each
Advanced tools
Comparing version
@@ -6,7 +6,23 @@ // Type definitions for for-each 0.3 | ||
declare function forEach<T = unknown, This = undefined>(arr: T[], callback: (this: This, value: T, index: number, array: T[]) => void, thisArg?: This): void; | ||
declare function forEach<T = unknown, This = undefined>(arr: ArrayLike<T>, callback: (this: This, value: T, index: number, array: ArrayLike<T>) => void, thisArg?: This): void; | ||
declare function forEach<V = unknown, K extends PropertyKey = PropertyKey, This = undefined>(obj: Record<K, V>, callback: (this: This, value: V, key: K, obj: Record<K, V>) => void, thisArg?: This): void; | ||
declare function forEach<This = undefined>(str: string, callback: (this: This, value: string, index: number, str: string) => void, thisArg: This): void; | ||
declare function forEach<T = unknown, This = undefined>( | ||
arr: T[], | ||
callback: (this: This, value: T, index: number, array: T[]) => void, | ||
thisArg?: This, | ||
): void; | ||
declare function forEach<T = unknown, This = undefined>( | ||
arr: ArrayLike<T>, | ||
callback: (this: This, value: T, index: number, array: ArrayLike<T>) => void, | ||
thisArg?: This, | ||
): void; | ||
declare function forEach<V = unknown, K extends PropertyKey = PropertyKey, This = undefined>( | ||
obj: Record<K, V>, | ||
callback: (this: This, value: V, key: K, obj: Record<K, V>) => void, | ||
thisArg?: This, | ||
): void; | ||
declare function forEach<This = undefined>( | ||
str: string, | ||
callback: (this: This, value: string, index: number, str: string) => void, | ||
thisArg: This, | ||
): void; | ||
export = forEach; |
{ | ||
"name": "@types/for-each", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "TypeScript definitions for for-each", | ||
@@ -23,4 +23,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/for-each", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "d68e69581e83e11baa2e41e8076485b662f6e5d0c8be78ee6ffa0cac23608a4a", | ||
"typeScriptVersion": "4.3" | ||
"typesPublisherContentHash": "6fbc31f5eca35e51bff5e1948bd5c6b80f456ee11b3181d4fd429580be5dea23", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -16,6 +16,22 @@ # Installation | ||
declare function forEach<T = unknown, This = undefined>(arr: T[], callback: (this: This, value: T, index: number, array: T[]) => void, thisArg?: This): void; | ||
declare function forEach<T = unknown, This = undefined>(arr: ArrayLike<T>, callback: (this: This, value: T, index: number, array: ArrayLike<T>) => void, thisArg?: This): void; | ||
declare function forEach<V = unknown, K extends PropertyKey = PropertyKey, This = undefined>(obj: Record<K, V>, callback: (this: This, value: V, key: K, obj: Record<K, V>) => void, thisArg?: This): void; | ||
declare function forEach<This = undefined>(str: string, callback: (this: This, value: string, index: number, str: string) => void, thisArg: This): void; | ||
declare function forEach<T = unknown, This = undefined>( | ||
arr: T[], | ||
callback: (this: This, value: T, index: number, array: T[]) => void, | ||
thisArg?: This, | ||
): void; | ||
declare function forEach<T = unknown, This = undefined>( | ||
arr: ArrayLike<T>, | ||
callback: (this: This, value: T, index: number, array: ArrayLike<T>) => void, | ||
thisArg?: This, | ||
): void; | ||
declare function forEach<V = unknown, K extends PropertyKey = PropertyKey, This = undefined>( | ||
obj: Record<K, V>, | ||
callback: (this: This, value: V, key: K, obj: Record<K, V>) => void, | ||
thisArg?: This, | ||
): void; | ||
declare function forEach<This = undefined>( | ||
str: string, | ||
callback: (this: This, value: string, index: number, str: string) => void, | ||
thisArg: This, | ||
): void; | ||
@@ -27,3 +43,3 @@ export = forEach; | ||
### Additional Details | ||
* Last updated: Mon, 11 Sep 2023 20:03:06 GMT | ||
* Last updated: Wed, 27 Sep 2023 20:35:06 GMT | ||
* Dependencies: none | ||
@@ -30,0 +46,0 @@ * Global values: none |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
4512
2.73%25
177.78%48
50%0
-100%