dethcrypto / dethcrypto/TypeChain
Problems with generation for projects that starts with a number
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 376
- PR merge metrics
- No merged PRs in 30d
Description
When importing `import "@0x/utils/blabla.sol";` there is an error:
```ts
SyntaxError: An identifier or keyword cannot immediately follow a numeric literal. (4:19)
2 | /* tslint:disable */
3 | /* eslint-disable */
> 4 | import type * as 0x from './@0x';
| ^
5 | export type { 0x };
at qe (/Users/pzixel/Documents/Repos/test/node_modules/prettier/parser-typescript.js:1:15607)
at UU (/Users/pzixel/Documents/Repos/test/node_modules/prettier/parser-typescript.js:280:5918)
at Object.zU [as parse] (/Users/pzixel/Documents/Repos/test/node_modules/prettier/parser-typescript.js:280:6241)
at Object.parse (/Users/pzixel/Documents/Repos/test/node_modules/prettier/index.js:7361:23)
at coreFormat (/Users/pzixel/Documents/Repos/test/node_modules/prettier/index.js:8672:18)
at formatWithCursor2 (/Users/pzixel/Documents/Repos/test/node_modules/prettier/index.js:8864:18)
at /Users/pzixel/Documents/Repos/test/node_modules/prettier/index.js:39174:12
at Object.format (/Users/pzixel/Documents/Repos/test/node_modules/prettier/index.js:39188:12)
at prettierOutputTransformer (/Users/pzixel/Documents/Repos/test/node_modules/typechain/src/codegen/outputTransformers/prettier.ts:8:19)
at /Users/pzixel/Documents/Repos/test/node_modules/typechain/src/typechain/io.ts:22:33 {
```
Similar problem exists for other projects starting with a number, e.g. `1inch`.
Contributor guide
Assessment
This issue has not been assessed yet.