mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 09:21:35 +00:00
Add initial std Symbol; Fix some type inference issues
This commit is contained in:
14
std/assembly.d.ts
vendored
14
std/assembly.d.ts
vendored
@ -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;
|
||||
|
Reference in New Issue
Block a user