/** * Accepted input Types for Uint8Array coercion. * */ type CoerceToUint8ArrayInput = (string | number | bigint | Array | Buffer | ArrayBufferLike | ArrayBufferView | NodeJS.ArrayBufferView); /** * Coerce data to Uint8Array. * * @param input The input data to convert. * @returns A new instance of Uint8Array. */ declare const coerceToUint8Array: (input: CoerceToUint8ArrayInput) => Uint8Array; /** * Coerce data to Int16Array. * * @param input The input data to convert. * @returns A new instance of Int16Array. */ declare const coerceToInt16Array: (input: CoerceToUint8ArrayInput) => Int16Array; /** * Coerce data to Uint16Array. * * @param input The input data to convert. * @returns A new instance of Uint16Array. */ declare const coerceToUint16Array: (input: CoerceToUint8ArrayInput) => Uint16Array; /** * Coerce data to Int32Array. * * @param input The input data to convert. * @returns A new instance of Int32Array. */ declare const coerceToInt32Array: (input: CoerceToUint8ArrayInput) => Int32Array; /** * Coerce data to Uint32Array. * * @param input The input data to convert. * @returns A new instance of Uint32Array. */ declare const coerceToUint32Array: (input: CoerceToUint8ArrayInput) => Uint32Array; /** * Coerce data to a SharedArrayBuffer. * * @param input The input data to convert. * @returns A new instance of SharedArrayBuffer. */ declare const coerceToSharedArrayBuffer: (input: CoerceToUint8ArrayInput) => SharedArrayBuffer; /** * FloatArray supported bits. * */ type FloatArraySupportedBits = 32 | 64; /** * Float32Array | Float64Array based on the given bit `T`. * */ type CoerceToFloatArrayReturnType = T extends 32 ? Float32Array : Float64Array; /** * Coerce data to Float32Array or Float64Array based on the given `bit`. * * @param input The input data to convert. * @param bit The number of bits used for different calculations. * @returns A new instance of Float32Array if `bit` is set to `32`, Float64Array otherwise. */ declare const coerceToFloatArray: (input: CoerceToUint8ArrayInput, bit: T) => CoerceToFloatArrayReturnType; /** * Coerce data to Float32Array. * * @param input The input data to convert. * @returns A new instance of Float32Array. */ declare const coerceToFloat32Array: (input: CoerceToUint8ArrayInput) => Float32Array; /** * Coerce data to Float64Array. * * @param input The input data to convert. * @returns A new instance of Float64Array. */ declare const coerceToFloat64Array: (input: CoerceToUint8ArrayInput) => Float64Array; /** * BigInt64Array | BigUint64Array based on the given `T`. * */ type BigArrayReturnType = T extends true ? BigUint64Array : BigInt64Array; /** * Coerce data to BigInt64Array or BigUint64Array. * * @param input The input data to convert. * @param isUnsigned If set to `true` BigUint64Array is returned, BigInt64Array otherwise. * @returns A new instance of BigUint64Array if `isUnsigned` is set to `true`, BigInt64Array otherwise. */ declare const coerceToBigArray: (input: CoerceToUint8ArrayInput, isUnsigned: T) => BigArrayReturnType; /** * Coerce data to BigInt64Array. * * @param input The input data to convert. * @returns A new instance of BigInt64Array. */ declare const coerceToBigInt64Array: (input: CoerceToUint8ArrayInput) => BigInt64Array; /** * Coerce data to BigUint64Array. * * @param input The input data to convert. * @returns A new instance of BigUint64Array. */ declare const coerceToBigUint64Array: (input: CoerceToUint8ArrayInput) => BigUint64Array; export { type CoerceToUint8ArrayInput, coerceToBigArray, coerceToBigInt64Array, coerceToBigUint64Array, coerceToFloat32Array, coerceToFloat64Array, coerceToFloatArray, coerceToInt16Array, coerceToInt32Array, coerceToSharedArrayBuffer, coerceToUint16Array, coerceToUint32Array, coerceToUint8Array };