lib: replace Float32Array global by the primordials
PR-URL: https://github.com/nodejs/node/pull/31195 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
4f51c12d41
commit
92cef79779
@ -19,6 +19,8 @@ rules:
|
||||
message: "Use `const { Boolean } = primordials;` instead of the global."
|
||||
- name: Error
|
||||
message: "Use `const { Error } = primordials;` instead of the global."
|
||||
- name: Float32Array
|
||||
message: "Use `const { Float32Array } = primordials;` instead of the global."
|
||||
- name: JSON
|
||||
message: "Use `const { JSON } = primordials;` instead of the global."
|
||||
- name: Map
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
const {
|
||||
BigInt,
|
||||
Float32Array,
|
||||
MathFloor,
|
||||
Number,
|
||||
} = primordials;
|
||||
|
@ -10,6 +10,7 @@ const {
|
||||
DatePrototypeToISOString,
|
||||
DatePrototypeToString,
|
||||
ErrorPrototypeToString,
|
||||
Float32Array,
|
||||
JSONStringify,
|
||||
Map,
|
||||
MapPrototype,
|
||||
|
Loading…
x
Reference in New Issue
Block a user