@microsoft/ccf-app

    Variable typedArrayConst

    typedArray: <T extends TypedArray>(
        clazz: TypedArrayConstructor<T>,
    ) => DataConverter<T> = ...

    Returns a converter for TypedArray objects.

    Note that a TypedArray is a view into an underlying ArrayBuffer. This view allows to cover a subset of the ArrayBuffer, for example when using TypedArray.prototype.subarray(). For views which are subsets, a roundtrip from TypedArray to ArrayBuffer and back will yield a TypedArray that is not a subset anymore.

    Example:

    const arr = new Uint8Array([42]);
    const conv = ccfapp.typedArray(Uint8Array);
    const buffer = conv.encode(arr); // ArrayBuffer of size arr.byteLength
    const arr2 = conv.decode(buffer); // Uint8Array

    Type declaration

    MMNEPVFCICPMFPCPTTAAATR