Add initial std Symbol; Fix some type inference issues

This commit is contained in:
dcodeIO
2018-06-21 19:42:18 +02:00
parent 1626e50b0f
commit c74eed2bd8
15 changed files with 4257 additions and 47 deletions

14
std/assembly.d.ts vendored
View File

@ -451,6 +451,14 @@ interface Number {}
interface Object {}
interface RegExp {}
declare class Map<K,V> {
readonly size: i32;
has(key: K): bool;
set(key: K, value: V): void;
delete(key: K): bool;
clear(): void;
}
declare class Set<T> {
readonly size: i32;
has(value: T): bool;
@ -459,6 +467,12 @@ declare class Set<T> {
clear(): void;
}
declare class Symbol {
constructor(description?: string | null);
static for(key: string): Symbol;
static keyFor(sym: Symbol): string | null;
}
interface IMath<T> {
/** The base of natural logarithms, e, approximately 2.718. */
readonly E: T;