Supress implicit index error with any

#76442
This commit is contained in:
Matt Bierner 2019-07-02 11:34:26 -07:00
parent a2b1f3e77c
commit 2d6205a548

View file

@ -46,9 +46,9 @@ export function size<T>(from: IStringDictionary<T> | INumberDictionary<T>): numb
}
export function first<T>(from: IStringDictionary<T> | INumberDictionary<T>): T | undefined {
for (let key in from) {
for (const key in from) {
if (hasOwnProperty.call(from, key)) {
return from[key];
return (from as any)[key];
}
}
return undefined;