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."
|
message: "Use `const { Boolean } = primordials;` instead of the global."
|
||||||
- name: Error
|
- name: Error
|
||||||
message: "Use `const { Error } = primordials;` instead of the global."
|
message: "Use `const { Error } = primordials;` instead of the global."
|
||||||
|
- name: Float32Array
|
||||||
|
message: "Use `const { Float32Array } = primordials;` instead of the global."
|
||||||
- name: JSON
|
- name: JSON
|
||||||
message: "Use `const { JSON } = primordials;` instead of the global."
|
message: "Use `const { JSON } = primordials;` instead of the global."
|
||||||
- name: Map
|
- name: Map
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
BigInt,
|
BigInt,
|
||||||
|
Float32Array,
|
||||||
MathFloor,
|
MathFloor,
|
||||||
Number,
|
Number,
|
||||||
} = primordials;
|
} = primordials;
|
||||||
|
@ -10,6 +10,7 @@ const {
|
|||||||
DatePrototypeToISOString,
|
DatePrototypeToISOString,
|
||||||
DatePrototypeToString,
|
DatePrototypeToString,
|
||||||
ErrorPrototypeToString,
|
ErrorPrototypeToString,
|
||||||
|
Float32Array,
|
||||||
JSONStringify,
|
JSONStringify,
|
||||||
Map,
|
Map,
|
||||||
MapPrototype,
|
MapPrototype,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user