Add no implicit any to the strict null check (#5635)

* wip

* working through adding no implicit any
This commit is contained in:
Anthony Dresser
2019-06-04 09:29:40 -07:00
committed by GitHub
parent 50242b2c35
commit 4ad226570a
26 changed files with 296 additions and 306 deletions

View File

@@ -58,6 +58,8 @@ export function first<T>(from: IStringDictionary<T> | INumberDictionary<T>): T |
* Iterates over each entry in the provided set. The iterator allows
* to remove elements and will stop when the callback returns {{false}}.
*/
export function forEach<T>(from: IStringDictionary<T>, callback: (entry: { key: string; value: T; }, remove: () => void) => any): void; // {{SQL CARBON EDIT}} @anthonydresser add hard typings
export function forEach<T>(from: INumberDictionary<T>, callback: (entry: { key: number; value: T; }, remove: () => void) => any): void;
export function forEach<T>(from: IStringDictionary<T> | INumberDictionary<T>, callback: (entry: { key: any; value: T; }, remove: () => void) => any): void {
for (let key in from) {
if (hasOwnProperty.call(from, key)) {
@@ -96,4 +98,4 @@ export function fromMap<T>(original: Map<string, T>): IStringDictionary<T> {
});
}
return result;
}
}