Skip to content

Commit f361deb

Browse files
committed
add some additional known static methods
1 parent 07aa646 commit f361deb

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

internal/config/globals.go

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,40 @@ var knownGlobals = [][]string{
164164
{"Reflect", "set"},
165165
{"Reflect", "setPrototypeOf"},
166166

167-
// JSON: Static Methods
167+
// JSON: Static methods
168168
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON#static_methods
169169
{"JSON", "parse"},
170170
{"JSON", "stringify"},
171171

172+
// TypedArray: Static methods
173+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#static_methods
174+
{"BigInt64Array", "from"},
175+
{"BigInt64Array", "of"},
176+
{"BigUint64Array", "from"},
177+
{"BigUint64Array", "of"},
178+
{"Float16Array", "from"},
179+
{"Float16Array", "of"},
180+
{"Float32Array", "from"},
181+
{"Float32Array", "of"},
182+
{"Float64Array", "from"},
183+
{"Float64Array", "of"},
184+
{"Int16Array", "from"},
185+
{"Int16Array", "of"},
186+
{"Int32Array", "from"},
187+
{"Int32Array", "of"},
188+
{"Int8Array", "from"},
189+
{"Int8Array", "of"},
190+
{"Uint16Array", "from"},
191+
{"Uint16Array", "of"},
192+
{"Uint32Array", "from"},
193+
{"Uint32Array", "of"},
194+
{"Uint8Array", "from"},
195+
{"Uint8Array", "fromBase64"},
196+
{"Uint8Array", "fromHex"},
197+
{"Uint8Array", "of"},
198+
{"Uint8ClampedArray", "from"},
199+
{"Uint8ClampedArray", "of"},
200+
172201
// Other globals present in both the browser and node. This should include at
173202
// least the following properties:
174203
// https://tc39.es/ecma262/multipage/global-object.html#sec-constructor-properties-of-the-global-object

0 commit comments

Comments
 (0)