Files
NapCatQQ/.pnpm-store/v3/files/b9/98a92093b52a3f6b0a820f0c7261b7a946d36bb44047850e4e270c8c78a5e9dafad07dedb9cc4e679583607632e9551832983b94c9a5523c8ff3a36e965a71
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

24 lines
646 B
Plaintext

'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
// https://262.ecma-international.org/13.0/#sec-typedarrayelementtype
var tableTAO = require('./tables/typed-array-objects');
module.exports = function TypedArrayElementType(O) {
var type = whichTypedArray(O);
if (!type) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray');
}
var result = tableTAO.name['$' + type];
if (typeof result !== 'string') {
throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`');
}
return result;
};