mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 09:21:35 +00:00
Add more inline-assembler-ish builtins; Update Binaryen
This commit is contained in:
14
std/assembly.d.ts
vendored
14
std/assembly.d.ts
vendored
@ -265,23 +265,23 @@ declare function alignof<T>(): usize;
|
||||
declare function offsetof<T>(fieldName?: string): usize;
|
||||
/** Changes the type of any value of `usize` kind to another one of `usize` kind. Useful for casting class instances to their pointer values and vice-versa. Beware that this is unsafe.*/
|
||||
declare function changetype<T>(value: any): T;
|
||||
/** Explicitly requests no bounds checks on the provided expression. */
|
||||
/** Explicitly requests no bounds checks on the provided expression. Useful for array accesses. */
|
||||
declare function unchecked<T>(value: T): T;
|
||||
/** Tests if a 32-bit or 64-bit float is `NaN`. */
|
||||
declare function isNaN<T = f32 | f64>(value: T): bool;
|
||||
/** Tests if a 32-bit or 64-bit float is finite, that is not `NaN` or +/-`Infinity`. */
|
||||
declare function isFinite<T = f32 | f64>(value: T): bool;
|
||||
/** Tests if the specified expression is of an integer type and not a reference. Compiles to a constant. */
|
||||
/** Tests if the specified type *or* expression is of an integer type and not a reference. Compiles to a constant. */
|
||||
declare function isInteger<T>(value?: any): value is number;
|
||||
/** Tests if the specified expression is of a float type. Compiles to a constant. */
|
||||
/** Tests if the specified type *or* expression is of a float type. Compiles to a constant. */
|
||||
declare function isFloat<T>(value?: any): value is number;
|
||||
/** Tests if the specified expression can represent negative numbers. Compiles to a constant. */
|
||||
/** Tests if the specified type *or* expression can represent negative numbers. Compiles to a constant. */
|
||||
declare function isSigned<T>(value?: any): value is number;
|
||||
/** Tests if the specified expression is of a reference type. Compiles to a constant. */
|
||||
/** Tests if the specified type *or* expression is of a reference type. Compiles to a constant. */
|
||||
declare function isReference<T>(value?: any): value is object | string;
|
||||
/** Tests if the specified expression can be used ass a string. Compiles to a constant. */
|
||||
/** Tests if the specified type *or* expression can be used as a string. Compiles to a constant. */
|
||||
declare function isString<T>(value?: any): value is string | String;
|
||||
/** Tests if the specified expression can be used as an array. Compiles to a constant. */
|
||||
/** Tests if the specified type *or* expression can be used as an array. Compiles to a constant. */
|
||||
declare function isArray<T>(value?: any): value is Array<any>;
|
||||
/** Traps if the specified value is not true-ish, otherwise returns the (non-nullable) value. */
|
||||
declare function assert<T>(isTrueish: T, message?: string): T & object; // any better way to model `: T != null`?
|
||||
|
Reference in New Issue
Block a user