神岛 API 文档 - ArenaPro版
    Preparing search index...

    Interface Int8ArrayConstructor

    Int8Array 构造函数。

    The Int8Array constructor.

    interface Int8ArrayConstructor {
        new Int8ArrayConstructor(elements: Iterable<number>): Int8Array;
        new Int8ArrayConstructor(length: number): Int8Array;
        new Int8ArrayConstructor(
            arrayOrArrayBuffer: ArrayBufferLike | ArrayLike<number>,
        ): Int8Array;
        new Int8ArrayConstructor(
            buffer: ArrayBufferLike,
            byteOffset: number,
            length?: number,
        ): Int8Array;
        BYTES_PER_ELEMENT: number;
        prototype: Int8Array<ArrayBufferLike>;
        from(arrayLike: ArrayLike<number>): Int8Array<ArrayBuffer>;
        from<T>(
            arrayLike: ArrayLike<T>,
            mapfn: (v: T, k: number) => number,
            thisArg?: any,
        ): Int8Array<ArrayBuffer>;
        from(elements: Iterable<number>): Int8Array<ArrayBuffer>;
        from<T>(
            elements: Iterable<T>,
            mapfn?: (v: T, k: number) => number,
            thisArg?: any,
        ): Int8Array<ArrayBuffer>;
        from(
            arrayLike: Iterable<number>,
            mapfn?: (v: number, k: number) => number,
            thisArg?: any,
        ): Int8Array;
        from(arrayLike: ArrayLike<number>): Int8Array;
        from<T>(
            arrayLike: ArrayLike<T>,
            mapfn: (v: T, k: number) => number,
            thisArg?: any,
        ): Int8Array;
    }
    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • elements: Iterable<number>

      Returns Int8Array

      创建一个新的 Int8Array 对象。

      Creates a new Int8Array object.

      可迭代的数字元素。

      An iterable of number elements.

    • Parameters

      • length: number

      Returns Int8Array

      创建一个新的 Int8Array 对象。

      Creates a new Int8Array object.

      数组的长度。

      The length of the array.

    • Parameters

      • arrayOrArrayBuffer: ArrayBufferLike | ArrayLike<number>

      Returns Int8Array

      创建一个新的 Int8Array 对象。

      Creates a new Int8Array object.

      一个类型化或非类型化数组,或者一个 ArrayBuffer。

      A typed or untyped array, or an ArrayBuffer.

    • Parameters

      • buffer: ArrayBufferLike
      • byteOffset: number
      • Optionallength: number

      Returns Int8Array

      创建一个新的 Int8Array 对象。

      Creates a new Int8Array object.

      一个 ArrayBuffer。

      An ArrayBuffer.

      数组的字节偏移量。

      The byte offset of the array.

      数组的长度。

      The length of the array.

    Properties

    BYTES_PER_ELEMENT: number

    The size in bytes of each element in the array.

    prototype: Int8Array<ArrayBufferLike>

    8 位整数值的类型化数组的原型。

    The Int8Array prototype.

    Methods

    • Creates an array from an array-like or iterable object.

      Parameters

      • arrayLike: ArrayLike<number>

        An array-like object to convert to an array.

      Returns Int8Array<ArrayBuffer>

    • Creates an array from an array-like or iterable object.

      Type Parameters

      • T

      Parameters

      • arrayLike: ArrayLike<T>

        An array-like object to convert to an array.

      • mapfn: (v: T, k: number) => number

        A mapping function to call on every element of the array.

      • OptionalthisArg: any

        Value of 'this' used to invoke the mapfn.

      Returns Int8Array<ArrayBuffer>

    • Creates an array from an array-like or iterable object.

      Parameters

      • elements: Iterable<number>

        An iterable object to convert to an array.

      Returns Int8Array<ArrayBuffer>

    • Creates an array from an array-like or iterable object.

      Type Parameters

      • T

      Parameters

      • elements: Iterable<T>

        An iterable object to convert to an array.

      • Optionalmapfn: (v: T, k: number) => number

        A mapping function to call on every element of the array.

      • OptionalthisArg: any

        Value of 'this' used to invoke the mapfn.

      Returns Int8Array<ArrayBuffer>

    • Parameters

      • arrayLike: Iterable<number>
      • Optionalmapfn: (v: number, k: number) => number
      • OptionalthisArg: any

      Returns Int8Array

      从类数组或可迭代对象创建一个数组。

      Creates an array from an array-like or iterable object.

      要转换为数组的类数组或可迭代对象。

      An array-like or iterable object to convert to an array.

      对数组的每个元素调用的映射函数。

      A mapping function to call on every element of the array.

      用于调用 mapfn 的 'this' 的值。

      Value of 'this' used to invoke the mapfn.

    • Parameters

      Returns Int8Array

      从一个可迭代对象或一个类数组对象创建一个新的 Int8Array 对象。

      Creates a new Int8Array object from an iterable object or an array-like object.

      一个可迭代对象或一个类数组对象。

      An iterable object or an array-like object.

    • Type Parameters

      • T

      Parameters

      • arrayLike: ArrayLike<T>
      • mapfn: (v: T, k: number) => number
      • OptionalthisArg: any

      Returns Int8Array

      创建一个数组,包含从 iterable 对象或可迭代对象中获取的元素。

      Creates an array from an array-like or iterable object.

      一个可迭代对象或一个类数组对象。

      An array-like or iterable object to convert to an array.

      一个映射函数,用于对数组中的每个元素进行映射。

      A mapping function to call on every element of the array.

      his的thisArg值用于调用mapfn。

      thisArg Value of 'this' used to invoke the mapfn.