Skip to content

Commit b5c9d69

Browse files
authored
Merge pull request #128 from iccicci/fix/unique-names
fix: add Map and Set to unique names
2 parents f1de9bc + 6ca316b commit b5c9d69

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/libs/get-unique-name.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ const RESERVED_WORDS = new Set([
116116
'length',
117117
'location',
118118
'locationbar',
119+
'Map',
119120
'Math',
120121
'menubar',
121122
'moveBy',
@@ -148,6 +149,7 @@ const RESERVED_WORDS = new Set([
148149
'scrollBy',
149150
'scrollTo',
150151
'self',
152+
'Set',
151153
'setInterval',
152154
'setTimeout',
153155
'status',
@@ -162,8 +164,8 @@ const RESERVED_WORDS = new Set([
162164
'valueOf',
163165
'watch',
164166
'window',
165-
// Typescript
166167

168+
// Typescript
167169
'as',
168170
'implements',
169171
'interface',

0 commit comments

Comments
 (0)