1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
//// [unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.ts]
interface IStringDictionary<V> {
[name: string]: V;
}
interface INumberDictionary<V> {
[idx: number]: V;
}
declare function forEach<T>(from: IStringDictionary<T> | INumberDictionary<T>, callback: (entry: { key: any; value: T; }, remove: () => void) => any);
let count = 0;
forEach({ toString: 123 }, () => count++);
//// [unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.js]
var count = 0;
forEach({ toString: 123 }, function () { return count++; });
|