import { BinaryDataType } from "../type/BinaryDataType.js";

/**
 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView
 * @readonly
 * @enum {string}
 */
export const DataType2DataViewWriters = {
    [BinaryDataType.Uint8]: "setUint8",
    [BinaryDataType.Uint16]: "setUint16",
    [BinaryDataType.Uint32]: "setUint32",
    [BinaryDataType.Uint64]: "setUint64",

    [BinaryDataType.Int8]: "setInt8",
    [BinaryDataType.Int16]: "setInt16",
    [BinaryDataType.Int32]: "setInt32",
    [BinaryDataType.Int64]: "setInt64",

    [BinaryDataType.Float32]: "setFloat32",
    [BinaryDataType.Float64]: "setFloat64"
};