* Perform excess property checking on intersection and union members * Allow partial union props to contain the undefined type * Add test case from #30771 * Un-terse getPossiblePropertiesOfUnionType side-effecting code * Fix bug exposed in RWC * Cache results of getPossiblePropertiesOfUnionType * Fix whitespace
12 lines
331 B
TypeScript
12 lines
331 B
TypeScript
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++);
|