import { Type, TypedBuffer } from './ref-type' export interface ArrayTypeValue { [i: number]: ArrayTypeValue['element']; length: number; toArray(): ArrayTypeValue['element'][]; toJSON(): ArrayTypeValue['element'][]; inspect(): string; buffer: Buffer; /* The following member are not exist at all, as they are used to inference type */ type: TypedBuffer>>['type'] element: TypedBuffer>['value'] /* The type of array element, such as 'char' */ value: TypedBuffer>>['value'] /* array type, such as 'char*' */ refer: TypedBuffer>>['refer'] /* refer to array type, such as 'char**' */ } export interface ArrayType extends Type { BYTES_PER_ELEMENT: number; fixedLength: number; /** The reference to the base type. */ type: Type; /** * Accepts a Buffer instance that should be an already-populated with data * for the ArrayType. The "length" of the Array is determined by searching * through the buffer's contents until an aligned NULL pointer is encountered. */ untilZeros(buffer: Buffer): ArrayTypeValue; new (length?: number): ArrayTypeValue; new (data: ArrayTypeValue['element'][], length?: number): ArrayTypeValue; new (data: Buffer, length?: number): ArrayTypeValue; (length?: number): ArrayTypeValue; (data: ArrayTypeValue['element'][], length?: number): ArrayTypeValue; (data: Buffer, length?: number): ArrayTypeValue; } /** * The array type meta-constructor. * The returned constructor's API is highly influenced by the WebGL * TypedArray API. */ export declare const ArrayType: { new (type: Type, length?: number): ArrayType; (type: Type, length?: number): ArrayType; };