Skip to content

Commit

Permalink
chore(move): better handle name conflict with system keywords (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
zfy0701 authored Nov 13, 2024
1 parent f230826 commit e18506c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/move/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ const KEYWORDS = new Set([
'bigint',
'any',
'new',
'delete'
'delete',
'symbol'
])

export function normalizeToJSName(name: string) {
if (KEYWORDS.has(name)) {
return name + '_'
return name + '$'
}
return name
}
Expand Down

0 comments on commit e18506c

Please sign in to comment.