We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 531b16f commit c119e83Copy full SHA for c119e83
src/get-static-value.js
@@ -4,6 +4,9 @@ const builtinNames = Object.freeze(
4
new Set([
5
"Array",
6
"ArrayBuffer",
7
+ "BigInt",
8
+ "BigInt64Array",
9
+ "BigUint64Array",
10
"Boolean",
11
"DataView",
12
"Date",
@@ -233,8 +236,8 @@ const operations = Object.freeze({
233
236
234
237
Literal(node) {
235
238
//istanbul ignore if : this is implementation-specific behavior.
- if (node.regex != null && node.value == null) {
- // It was a RegExp literal, but Node.js didn't support it.
239
+ if ((node.regex != null || node.bigint != null) && node.value == null) {
240
+ // It was a RegExp/BigInt literal, but Node.js didn't support it.
241
return null
242
}
243
return node
0 commit comments