///////////////////////////// /// IE10 ECMAScript Extensions ///////////////////////////// /** * Represents a raw buffer of binary data, which is used to store data for the * different typed arrays. ArrayBuffers cannot be read from or written to directly, * but can be passed to a typed array or DataView Object to interpret the raw * buffer as needed. */ interface ArrayBuffer { /** * Read-only. The length of the ArrayBuffer (in bytes). */ byteLength: number; /** * Returns a section of an ArrayBuffer. */ slice(begin:number, end?:number): ArrayBuffer; } declare var ArrayBuffer: { prototype: ArrayBuffer; new (byteLength: number): ArrayBuffer; } interface ArrayBufferView { buffer: ArrayBuffer; byteOffset: number; byteLength: number; } /** * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised. */ interface Int8Array extends ArrayBufferView { /** * The size in bytes of each element in the array. */ BYTES_PER_ELEMENT: number; /** * The length of the array. */ length: number; [index: number]: number; /** * Gets the element at the specified index. * @param index The index at which to get the element of the array. */ get(index: number): number; /** * Sets a value or an array of values. * @param index The index of the location to set. * @param value The value to set. */ set(index: number, value: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: Int8Array, offset?: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: number[], offset?: number): void; /** * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements at begin, inclusive, up to end, exclusive. * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ subarray(begin: number, end?: number): Int8Array; } declare var Int8Array: { prototype: Int8Array; new (length: number): Int8Array; new (array: Int8Array): Int8Array; new (array: number[]): Int8Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; BYTES_PER_ELEMENT: number; } /** * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised. */ interface Uint8Array extends ArrayBufferView { /** * The size in bytes of each element in the array. */ BYTES_PER_ELEMENT: number; /** * The length of the array. */ length: number; [index: number]: number; /** * Gets the element at the specified index. * @param index The index at which to get the element of the array. */ get(index: number): number; /** * Sets a value or an array of values. * @param index The index of the location to set. * @param value The value to set. */ set(index: number, value: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: Uint8Array, offset?: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: number[], offset?: number): void; /** * Gets a new Uint8Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ subarray(begin: number, end?: number): Uint8Array; } declare var Uint8Array: { prototype: Uint8Array; new (length: number): Uint8Array; new (array: Uint8Array): Uint8Array; new (array: number[]): Uint8Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; BYTES_PER_ELEMENT: number; } /** * A typed array of 16-bit integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised. */ interface Int16Array extends ArrayBufferView { /** * The size in bytes of each element in the array. */ BYTES_PER_ELEMENT: number; /** * The length of the array. */ length: number; [index: number]: number; /** * Gets the element at the specified index. * @param index The index at which to get the element of the array. */ get(index: number): number; /** * Sets a value or an array of values. * @param index The index of the location to set. * @param value The value to set. */ set(index: number, value: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: Int16Array, offset?: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: number[], offset?: number): void; /** * Gets a new Int16Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ subarray(begin: number, end?: number): Int16Array; } declare var Int16Array: { prototype: Int16Array; new (length: number): Int16Array; new (array: Int16Array): Int16Array; new (array: number[]): Int16Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; BYTES_PER_ELEMENT: number; } /** * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised. */ interface Uint16Array extends ArrayBufferView { /** * The size in bytes of each element in the array. */ BYTES_PER_ELEMENT: number; /** * The length of the array. */ length: number; [index: number]: number; /** * Gets the element at the specified index. * @param index The index at which to get the element of the array. */ get(index: number): number; /** * Sets a value or an array of values. * @param index The index of the location to set. * @param value The value to set. */ set(index: number, value: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: Uint16Array, offset?: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: number[], offset?: number): void; /** * Gets a new Uint16Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ subarray(begin: number, end?: number): Uint16Array; } declare var Uint16Array: { prototype: Uint16Array; new (length: number): Uint16Array; new (array: Uint16Array): Uint16Array; new (array: number[]): Uint16Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; BYTES_PER_ELEMENT: number; } /** * A typed array of 32-bit integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised. */ interface Int32Array extends ArrayBufferView { /** * The size in bytes of each element in the array. */ BYTES_PER_ELEMENT: number; /** * The length of the array. */ length: number; [index: number]: number; /** * Gets the element at the specified index. * @param index The index at which to get the element of the array. */ get(index: number): number; /** * Sets a value or an array of values. * @param index The index of the location to set. * @param value The value to set. */ set(index: number, value: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: Int32Array, offset?: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: number[], offset?: number): void; /** * Gets a new Int32Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ subarray(begin: number, end?: number): Int32Array; } declare var Int32Array: { prototype: Int32Array; new (length: number): Int32Array; new (array: Int32Array): Int32Array; new (array: number[]): Int32Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; BYTES_PER_ELEMENT: number; } /** * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised. */ interface Uint32Array extends ArrayBufferView { /** * The size in bytes of each element in the array. */ BYTES_PER_ELEMENT: number; /** * The length of the array. */ length: number; [index: number]: number; /** * Gets the element at the specified index. * @param index The index at which to get the element of the array. */ get(index: number): number; /** * Sets a value or an array of values. * @param index The index of the location to set. * @param value The value to set. */ set(index: number, value: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: Uint32Array, offset?: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: number[], offset?: number): void; /** * Gets a new Int8Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ subarray(begin: number, end?: number): Uint32Array; } declare var Uint32Array: { prototype: Uint32Array; new (length: number): Uint32Array; new (array: Uint32Array): Uint32Array; new (array: number[]): Uint32Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; BYTES_PER_ELEMENT: number; } /** * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised. */ interface Float32Array extends ArrayBufferView { /** * The size in bytes of each element in the array. */ BYTES_PER_ELEMENT: number; /** * The length of the array. */ length: number; [index: number]: number; /** * Gets the element at the specified index. * @param index The index at which to get the element of the array. */ get(index: number): number; /** * Sets a value or an array of values. * @param index The index of the location to set. * @param value The value to set. */ set(index: number, value: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: Float32Array, offset?: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: number[], offset?: number): void; /** * Gets a new Float32Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ subarray(begin: number, end?: number): Float32Array; } declare var Float32Array: { prototype: Float32Array; new (length: number): Float32Array; new (array: Float32Array): Float32Array; new (array: number[]): Float32Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; BYTES_PER_ELEMENT: number; } /** * A typed array of 64-bit float values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised. */ interface Float64Array extends ArrayBufferView { /** * The size in bytes of each element in the array. */ BYTES_PER_ELEMENT: number; /** * The length of the array. */ length: number; [index: number]: number; /** * Gets the element at the specified index. * @param index The index at which to get the element of the array. */ get(index: number): number; /** * Sets a value or an array of values. * @param index The index of the location to set. * @param value The value to set. */ set(index: number, value: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: Float64Array, offset?: number): void; /** * Sets a value or an array of values. * @param array A typed or untyped array of values to set. * @param offset The index in the current array at which the values are to be written. */ set(array: number[], offset?: number): void; /** * Gets a new Float64Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ subarray(begin: number, end?: number): Float64Array; } declare var Float64Array: { prototype: Float64Array; new (length: number): Float64Array; new (array: Float64Array): Float64Array; new (array: number[]): Float64Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; BYTES_PER_ELEMENT: number; } /** * You can use a DataView object to read and write the different kinds of binary data to any location in the ArrayBuffer. */ interface DataView extends ArrayBufferView { /** * Gets the Int8 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. */ getInt8(byteOffset: number): number; /** * Gets the Uint8 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. */ getUint8(byteOffset: number): number; /** * Gets the Int16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. */ getInt16(byteOffset: number, littleEndian?: boolean): number; /** * Gets the Uint16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. */ getUint16(byteOffset: number, littleEndian?: boolean): number; /** * Gets the Int32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. */ getInt32(byteOffset: number, littleEndian?: boolean): number; /** * Gets the Uint32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. */ getUint32(byteOffset: number, littleEndian?: boolean): number; /** * Gets the Float32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. */ getFloat32(byteOffset: number, littleEndian?: boolean): number; /** * Gets the Float64 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. */ getFloat64(byteOffset: number, littleEndian?: boolean): number; /** * Stores an Int8 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. */ setInt8(byteOffset: number, value: number): void; /** * Stores an Uint8 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. */ setUint8(byteOffset: number, value: number): void; /** * Stores an Int16 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. * @param littleEndian If false or undefined, a big-endian value should be written, otherwise a little-endian value should be written. */ setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; /** * Stores an Uint16 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. * @param littleEndian If false or undefined, a big-endian value should be written, otherwise a little-endian value should be written. */ setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; /** * Stores an Int32 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. * @param littleEndian If false or undefined, a big-endian value should be written, otherwise a little-endian value should be written. */ setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; /** * Stores an Uint32 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. * @param littleEndian If false or undefined, a big-endian value should be written, otherwise a little-endian value should be written. */ setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; /** * Stores an Float32 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. * @param littleEndian If false or undefined, a big-endian value should be written, otherwise a little-endian value should be written. */ setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; /** * Stores an Float64 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. * @param littleEndian If false or undefined, a big-endian value should be written, otherwise a little-endian value should be written. */ setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; } declare var DataView: { prototype: DataView; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): DataView; } ///////////////////////////// /// IE11 ECMAScript Extensions ///////////////////////////// interface Map { clear(): void; delete(key: K): boolean; forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void; get(key: K): V; has(key: K): boolean; set(key: K, value: V): Map; size: number; } declare var Map: { new (): Map; prototype: Map; } interface WeakMap { clear(): void; delete(key: K): boolean; get(key: K): V; has(key: K): boolean; set(key: K, value: V): WeakMap; } declare var WeakMap: { new (): WeakMap; prototype: WeakMap; } interface Set { add(value: T): Set; clear(): void; delete(value: T): boolean; forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void; has(value: T): boolean; size: number; } declare var Set: { new (): Set; prototype: Set; }