Skip to content

Commit

Permalink
chore(move): add more ts keywords (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
zfy0701 authored Nov 13, 2024
1 parent e18506c commit 5845f90
Showing 1 changed file with 63 additions and 8 deletions.
71 changes: 63 additions & 8 deletions packages/move/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,74 @@ export function accountAddressString(account: string): string {
return `0x${address.padStart(MOVE_ADDRESS_LENGTH * 2, '0')}`
}

// https://github.com/microsoft/TypeScript/issues/2536
const KEYWORDS = new Set([
'break',
'case',
'catch',
'class',
'const',
'continue',
'debugger',
'default',
'delete',
'do',
'else',
'enum',
'export',
'extends',
'false',
'finally',
'for',
'function',
'if',
'import',
'in',
'instanceof',
'new',
'null',
'return',
'super',
'switch',
'this',
'throw',
'true',
'try',
'typeof',
'var',
'void',
'while',
'with',
'as',
'implements',
'interface',
'let',
'package',
'namespace',
'volatile',
'object',
'string',
'private',
'protected',
'public',
'static',
'yield',
'any',
'boolean',
'constructor',
'declare',
// 'get',
'module',
// 'require',
'number',
// 'set',
'string',
'symbol',
'type',
'from',
// 'of',
'async',
'await',
'bigint',
'any',
'new',
'delete',
'symbol'
'object',
'volatile',
'namespace'
])

export function normalizeToJSName(name: string) {
Expand Down

0 comments on commit 5845f90

Please sign in to comment.