Correcting typing for d3.map.entries

This commit is contained in:
Brandon Luong
2014-09-30 14:20:57 -07:00
parent 8fd6340d84
commit 6e5bc3c514
Vendored
+6 -1
View File
@@ -841,6 +841,11 @@ declare module D3 {
entries(values: any[]): NestKeyValue[];
}
export interface MapKeyValue<T> {
key: string;
value: T;
}
export interface Map<T> {
has(key: string): boolean;
get(key: string): T;
@@ -848,7 +853,7 @@ declare module D3 {
remove(key: string): boolean;
keys(): string[];
values(): T[];
entries(): any[][]; // Actually of form [key: string, val: T][], but this is inexpressible in Typescript
entries(): KeyValue<T>[];
forEach(func: (key: string, value: T) => void ): void;
empty(): boolean;
size(): number;