import { type PlainCompletion } from '../completion.mts'; import { BigIntValue, BooleanValue, JSStringValue, NullValue, NumberValue, ObjectValue, UndefinedValue, Value, type Arguments } from '../value.mts'; import { type Mutable } from '../utils/language.mts'; import type { PlainEvaluator, ValueEvaluator } from '../evaluator.mts'; import { Realm, type FunctionObject, ToBigInt64, ToBigUint64, ToInt16, ToInt32, ToInt8, ToUint16, ToUint32, ToUint8, ToUint8Clamp, type ArrayBufferObject, type ExoticObject, type Intrinsics, type TypedArrayWithBufferWitnessRecord } from '#self'; export declare const typedArrayInfoByName: { readonly Int8Array: { readonly IntrinsicName: '%Int8Array%'; readonly ElementType: 'Int8'; readonly ElementSize: 1; readonly ConversionOperation: typeof ToInt8; }; readonly Uint8Array: { readonly IntrinsicName: '%Uint8Array%'; readonly ElementType: 'Uint8'; readonly ElementSize: 1; readonly ConversionOperation: typeof ToUint8; }; readonly Uint8ClampedArray: { readonly IntrinsicName: '%Uint8ClampedArray%'; readonly ElementType: 'Uint8C'; readonly ElementSize: 1; readonly ConversionOperation: typeof ToUint8Clamp; }; readonly Int16Array: { readonly IntrinsicName: '%Int16Array%'; readonly ElementType: 'Int16'; readonly ElementSize: 2; readonly ConversionOperation: typeof ToInt16; }; readonly Uint16Array: { readonly IntrinsicName: '%Uint16Array%'; readonly ElementType: 'Uint16'; readonly ElementSize: 2; readonly ConversionOperation: typeof ToUint16; }; readonly Int32Array: { readonly IntrinsicName: '%Int32Array%'; readonly ElementType: 'Int32'; readonly ElementSize: 4; readonly ConversionOperation: typeof ToInt32; }; readonly Uint32Array: { readonly IntrinsicName: '%Uint32Array%'; readonly ElementType: 'Uint32'; readonly ElementSize: 4; readonly ConversionOperation: typeof ToUint32; }; readonly BigInt64Array: { readonly IntrinsicName: '%BigInt64Array%'; readonly ElementType: 'BigInt64'; readonly ElementSize: 8; readonly ConversionOperation: typeof ToBigInt64; }; readonly BigUint64Array: { readonly IntrinsicName: '%BigUint64Array%'; readonly ElementType: 'BigUint64'; readonly ElementSize: 8; readonly ConversionOperation: typeof ToBigUint64; }; readonly Float16Array: { readonly IntrinsicName: '%Float16Array%'; readonly ElementType: 'Float16'; readonly ElementSize: 2; readonly ConversionOperation: undefined; }; readonly Float32Array: { readonly IntrinsicName: '%Float32Array%'; readonly ElementType: 'Float32'; readonly ElementSize: 4; readonly ConversionOperation: undefined; }; readonly Float64Array: { readonly IntrinsicName: '%Float64Array%'; readonly ElementType: 'Float64'; readonly ElementSize: 8; readonly ConversionOperation: undefined; }; }; export type TypedArrayConstructorNames = keyof typeof typedArrayInfoByName; export declare const typedArrayInfoByType: { readonly Int8: { readonly IntrinsicName: '%Int8Array%'; readonly ElementType: 'Int8'; readonly ElementSize: 1; readonly ConversionOperation: typeof ToInt8; }; readonly Uint8: { readonly IntrinsicName: '%Uint8Array%'; readonly ElementType: 'Uint8'; readonly ElementSize: 1; readonly ConversionOperation: typeof ToUint8; }; readonly Uint8C: { readonly IntrinsicName: '%Uint8ClampedArray%'; readonly ElementType: 'Uint8C'; readonly ElementSize: 1; readonly ConversionOperation: typeof ToUint8Clamp; }; readonly Int16: { readonly IntrinsicName: '%Int16Array%'; readonly ElementType: 'Int16'; readonly ElementSize: 2; readonly ConversionOperation: typeof ToInt16; }; readonly Uint16: { readonly IntrinsicName: '%Uint16Array%'; readonly ElementType: 'Uint16'; readonly ElementSize: 2; readonly ConversionOperation: typeof ToUint16; }; readonly Int32: { readonly IntrinsicName: '%Int32Array%'; readonly ElementType: 'Int32'; readonly ElementSize: 4; readonly ConversionOperation: typeof ToInt32; }; readonly Uint32: { readonly IntrinsicName: '%Uint32Array%'; readonly ElementType: 'Uint32'; readonly ElementSize: 4; readonly ConversionOperation: typeof ToUint32; }; readonly BigInt64: { readonly IntrinsicName: '%BigInt64Array%'; readonly ElementType: 'BigInt64'; readonly ElementSize: 8; readonly ConversionOperation: typeof ToBigInt64; }; readonly BigUint64: { readonly IntrinsicName: '%BigUint64Array%'; readonly ElementType: 'BigUint64'; readonly ElementSize: 8; readonly ConversionOperation: typeof ToBigUint64; }; readonly Float16: { readonly IntrinsicName: '%Float16Array%'; readonly ElementType: 'Float16'; readonly ElementSize: 2; readonly ConversionOperation: undefined; }; readonly Float32: { readonly IntrinsicName: '%Float32Array%'; readonly ElementType: 'Float32'; readonly ElementSize: 4; readonly ConversionOperation: undefined; }; readonly Float64: { readonly IntrinsicName: '%Float64Array%'; readonly ElementType: 'Float64'; readonly ElementSize: 8; readonly ConversionOperation: undefined; }; }; export type TypedArrayTypes = keyof typeof typedArrayInfoByType; export interface TypedArrayObject extends ExoticObject { readonly Prototype: ObjectValue | NullValue; readonly Extensible: BooleanValue; ViewedArrayBuffer: ArrayBufferObject | UndefinedValue; readonly ArrayLength: number | 'auto'; readonly ByteOffset: number; readonly ContentType: 'BigInt' | 'Number'; readonly TypedArrayName: JSStringValue; readonly ByteLength: number | 'auto'; } export declare function isTypedArrayObject(value: Value): value is TypedArrayObject; /** https://tc39.es/ecma262/#typedarray-species-create */ export declare function TypedArraySpeciesCreate(exemplar: TypedArrayObject, argumentList: Arguments): ValueEvaluator; /** https://tc39.es/ecma262/#sec-typedarraycreatefromconstructor */ export declare function TypedArrayCreateFromConstructor(constructor: FunctionObject, argumentList: Arguments): ValueEvaluator; /** https://tc39.es/ecma262/#sec-typedarray-create-same-type */ export declare function TypedArrayCreateSameType(exemplar: TypedArrayObject, length: number): ValueEvaluator; /** https://tc39.es/ecma262/#sec-validatetypedarray */ export declare function ValidateTypedArray(O: Value, order: 'seq-cst' | 'unordered'): PlainCompletion; /** https://tc39.es/ecma262/#sec-typedarrayelementsize */ export declare function TypedArrayElementSize(O: TypedArrayObject): number; /** https://tc39.es/ecma262/#sec-typedarrayelementtype */ export declare function TypedArrayElementType(O: TypedArrayObject): TypedArrayTypes; /** https://tc39.es/ecma262/#sec-comparetypedarrayelements */ export declare function CompareTypedArrayElements(x: NumberValue | BigIntValue, y: NumberValue | BigIntValue, comparator: FunctionObject | UndefinedValue): ValueEvaluator; /** https://tc39.es/ecma262/#sec-allocatetypedarray */ export declare function AllocateTypedArray(constructorName: JSStringValue, newTarget: FunctionObject, defaultProto: keyof Intrinsics, length?: number): ValueEvaluator>; /** https://tc39.es/ecma262/#sec-initializetypedarrayfromtypedarray */ export declare function InitializeTypedArrayFromTypedArray(O: Mutable, srcArray: TypedArrayObject): PlainEvaluator; /** https://tc39.es/ecma262/#sec-initializetypedarrayfromarraybuffer */ export declare function InitializeTypedArrayFromArrayBuffer(O: Mutable, buffer: ArrayBufferObject, byteOffset: Value, length: Value): PlainEvaluator; /** https://tc39.es/ecma262/#sec-initializetypedarrayfromlist */ export declare function InitializeTypedArrayFromList(O: Mutable, value: Value[]): PlainEvaluator; /** https://tc39.es/ecma262/#sec-initializetypedarrayfromarraylike */ export declare function InitializeTypedArrayFromArrayLike(O: Mutable, arrayLike: ObjectValue): PlainEvaluator; /** https://tc39.es/ecma262/#sec-allocatetypedarraybuffer */ export declare function AllocateTypedArrayBuffer(O: TypedArrayObject, length: number): ValueEvaluator; export declare function bootstrapTypedArray(realmRec: Realm): void; //# sourceMappingURL=TypedArray.d.mts.map