/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ /** * Distills an `ArrayBuffer` from an `ArrayBufferLike` or creates one from `SharedArrayBuffer` if needed. * * @param buffer - `ArrayBuffer` or any `ArrayBufferLike` to convert to `ArrayBuffer`. * * @remarks The returned buffer may be the input array's backing buffer or a copy of its bytes. * Callers should not mutate the returned buffer unless they own the input array and its backing * storage, and should not rely on mutations being reflected in the input array. * * @internal */ export declare function ArrayBufferLikeToArrayBuffer(buffer: ArrayBufferLike): ArrayBuffer; /** * Distills a `Uint8Array` array to an `ArrayBuffer | SharedArrayBuffer` copying * data as needed per the array's `byteOffset` and `byteLength` to have a full * buffer (no offset and entire length). * * @param array - Array to extract buffer from. * * @remarks The returned buffer may be the input array's backing buffer or a copy of its bytes. * Callers should not mutate the returned buffer unless they own the input array and its backing * storage, and should not rely on mutations being reflected in the input array. * * @internal */ export declare function Uint8ArrayToArrayBufferLike(array: Uint8Array): TArrayBuffer; /** * Distills a `Uint8Array` array to an `ArrayBuffer` copying data as needed per the array's * `byteOffset` and `byteLength` or if underlying buffer is not `ArrayBuffer`. * * @param array - Array to convert to `ArrayBuffer`. * * @remarks The returned buffer may be the input array's backing buffer or a copy of its bytes. * Callers should not mutate the returned buffer unless they own the input array and its backing * storage, and should not rely on mutations being reflected in the input array. * * Prefer to use {@link Uint8ArrayToArrayBufferLike} if the call site doesn't require * an explicit `ArrayBuffer` (can also handle `SharedArrayBuffer`). * * @internal */ export declare function AnyUint8ArrayToArrayBuffer(array: Uint8Array): ArrayBuffer; //# sourceMappingURL=bufferShared.d.ts.map