AK-21/Graphite-Industrial-Intelligence
0
1/*! *****************************************************************************2Copyright (c) Microsoft Corporation. All rights reserved.3Licensed under the Apache License, Version 2.0 (the "License"); you may not use4this file except in compliance with the License. You may obtain a copy of the5License at http://www.apache.org/licenses/LICENSE-2.06 7THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY8KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED9WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,10MERCHANTABILITY OR NON-INFRINGEMENT.11 12See the Apache Version 2.0 License for specific language governing permissions13and limitations under the License.14***************************************************************************** */15 16 17interface ArrayBuffer {18 /**19 * If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not.20 *21 * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/maxByteLength)22 */23 get maxByteLength(): number;24 25 /**26 * Returns true if this ArrayBuffer can be resized.27 *28 * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resizable)29 */30 get resizable(): boolean;31 32 /**33 * Resizes the ArrayBuffer to the specified size (in bytes).34 *35 * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resize)36 */37 resize(newByteLength?: number): void;38 39 /**40 * Returns a boolean indicating whether or not this buffer has been detached (transferred).41 *42 * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/detached)43 */44 get detached(): boolean;45 46 /**47 * Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer.48 *49 * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer)50 */51 transfer(newByteLength?: number): ArrayBuffer;52 53 /**54 * Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer.55 *56 * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transferToFixedLength)57 */58 transferToFixedLength(newByteLength?: number): ArrayBuffer;59}60 61interface ArrayBufferConstructor {62 new (byteLength: number, options?: { maxByteLength?: number; }): ArrayBuffer;63}64 