mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-20 18:26:40 +00:00
Initial ArrayBuffer implementation; Conditional allocation within constructors; Explicit constructor return values
This commit is contained in:
10
std/portable.d.ts
vendored
10
std/portable.d.ts
vendored
@ -200,6 +200,16 @@ declare function parseFloat(str: string): f64;
|
||||
declare const NaN: f32 | f64;
|
||||
declare const Infinity: f32 | f64;
|
||||
|
||||
/** Class representing a generic, fixed-length raw binary data buffer. */
|
||||
declare class ArrayBuffer {
|
||||
/** The size, in bytes, of the array. */
|
||||
readonly byteLength: i32;
|
||||
/** Constructs a new array buffer of the given length in bytes. */
|
||||
constructor(length: i32);
|
||||
/** Returns a copy of this array buffer's bytes from begin, inclusive, up to end, exclusive. */
|
||||
slice(begin?: i32, end?: i32): ArrayBuffer;
|
||||
}
|
||||
|
||||
declare class Array<T> {
|
||||
[key: number]: T;
|
||||
length: i32;
|
||||
|
Reference in New Issue
Block a user