Interface ArrayBuffer
interface ArrayBuffer {
"[toStringTag]": string;
byteLength: number;
get detached(): boolean;
get maxByteLength(): number;
get resizable(): boolean;
resize(newByteLength?: number): void;
slice(begin?: number, end?: number): ArrayBuffer;
transfer(newByteLength?: number): ArrayBuffer;
transferToFixedLength(newByteLength?: number): ArrayBuffer;
}
"[toStringTag]": string;
byteLength: number;
get detached(): boolean;
get maxByteLength(): number;
get resizable(): boolean;
resize(newByteLength?: number): void;
slice(begin?: number, end?: number): ArrayBuffer;
transfer(newByteLength?: number): ArrayBuffer;
transferToFixedLength(newByteLength?: number): ArrayBuffer;
}
Index
Properties
Accessors
Methods
Accessors
detached
- get detached(): boolean
Returns a boolean indicating whether or not this buffer has been detached (transferred).
Returns boolean
maxByteLength
- get maxByteLength(): number
If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not.
Returns number
resizable
- get resizable(): boolean
Returns true if this ArrayBuffer can be resized.
Returns boolean
Methods
resize
slice
- slice(begin?: number, end?: number): ArrayBuffer
Returns a section of an ArrayBuffer.
Parameters
Optional
begin: numberOptional
end: number
Returns ArrayBuffer
transfer
- transfer(newByteLength?: number): ArrayBuffer
Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer.
Parameters
Optional
newByteLength: number
Returns ArrayBuffer
transferToFixedLength
- transferToFixedLength(newByteLength?: number): ArrayBuffer
Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer.
Parameters
Optional
newByteLength: number
Returns ArrayBuffer
Read-only. The length of the ArrayBuffer (in bytes).