1/* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * TS/JS standard classes defined in TypeScript stdlib as ambient global variables 18 * with interface-based constructor type. 19 */ 20 21export const StdClassVarDecls = new Map<string, string>([ 22 ['Object', 'ObjectConstructor'], 23 ['Function', 'FunctionConstructor'], 24 ['String', 'StringConstructor'], 25 ['Boolean', 'BooleanConstructor'], 26 ['Number', 'NumberConstructor'], 27 ['Math', 'Math'], 28 ['Date', 'DateConstructor'], 29 ['RegExp', 'RegExpConstructor'], 30 ['Error', 'ErrorConstructor'], 31 ['EvalError', 'EvalErrorConstructor'], 32 ['RangeError', 'RangeErrorConstructor'], 33 ['ReferenceError', 'ReferenceErrorConstructor'], 34 ['SyntaxError', 'SyntaxErrorConstructor'], 35 ['TypeError', 'TypeErrorConstructor'], 36 ['URIError', 'URIErrorConstructor'], 37 ['AggregateError', 'AggregateErrorConstructor'], 38 ['JSON', 'JSON'], 39 ['Array', 'ArrayConstructor'], 40 ['ArrayBuffer', 'ArrayBufferConstructor'], 41 ['DataView', 'DataViewConstructor'], 42 ['Int8Array', 'Int8ArrayConstructor'], 43 ['Uint8Array', 'Uint8ArrayConstructor'], 44 ['Uint8ClampedArray', 'Uint8ClampedArrayConstructor'], 45 ['Int16Array', 'Int16ArrayConstructor'], 46 ['Uint16Array', 'Uint16ArrayConstructor'], 47 ['Int32Array', 'Int32ArrayConstructor'], 48 ['Uint32Array', 'Uint32ArrayConstructor'], 49 ['Float32Array', 'Float32ArrayConstructor'], 50 ['Float64Array', 'Float64ArrayConstructor'], 51 ['Map', 'MapConstructor'], 52 ['WeakMap', 'WeakMapConstructor'], 53 ['Set', 'SetConstructor'], 54 ['WeakSet', 'WeakSetConstructor'], 55 ['Promise', 'PromiseConstructor'], 56 ['Proxy', 'ProxyConstructor'], 57 ['Symbol', 'SymbolConstructor'], 58 ['SharedArrayBuffer', 'SharedArrayBufferConstructor'], 59 ['Atomics', 'Atomics'], 60 ['BigInt', 'BigIntConstructor'], 61 ['BigInt64Array', 'BigInt64ArrayConstructor'], 62 ['BigUint64Array', 'BigUint64ArrayConstructor'], 63 ['WeakRef', 'WeakRefConstructor'], 64 ['FinalizationRegistry', 'FinalizationRegistryConstructor'] 65]); 66