mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #2908 from bluong/d3MapEntries
Correcting typing for d3.map.entries
This commit is contained in:
Vendored
+6
-1
@@ -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(): MapKeyValue<T>[];
|
||||
forEach(func: (key: string, value: T) => void ): void;
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
|
||||
Reference in New Issue
Block a user