-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
In a lot of implementations, like the ES2015
's collection spec:
interface Map<K, V> {
clear(): void;
delete(key: K): boolean;
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
get(key: K): V | undefined;
has(key: K): boolean;
set(key: K, value: V): this;
readonly size: number;
}
interface MapConstructor {
new (): Map<any, any>;
new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
readonly prototype: Map<any, any>;
}
declare var Map: MapConstructor;
This issue is to track such overloading support for combining such types together where possible, which should emit just a Dart interface combining the sub implementations (in this case, MapConstructor
and Map
). The var
declaration will be combined, converting all the properties on its type into static properties.
extension type Map<K extends JSAny, V extends JSAny>._(JSObject _) implements JSObject {
/** summed up declarations and constructors */
}
(See #388 for more)
Metadata
Metadata
Assignees
Labels
No labels