dethcrypto / dethcrypto/TypeChain
typechain errors when a directory in the imported path contains an integer as first character
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 376
- PR merge metrics
- No merged PRs in 30d
Description
TypeChain auto generated files are transforming paths into modules.
However, if a directory in the path starts with an Integer, this creates a module name starting with an integer, which is not valid in node and breaks TypeChain
## Examples
### importing package from node_modules
```
import {SignedAllowance} from "@0xdievardump/signed-allowances/contracts/SignedAllowance.sol";
```
```
SyntaxError: Identifier expected. (4:18)
2 | /* tslint:disable */
3 | /* eslint-disable */
> 4 | import type * as 0Xdievardump from './@0xdievardump';
| ^
```
### importing local file
```
import {$721Renderer} from "./721Renderers/$721Renderer.sol";
```
```
SyntaxError: An identifier or keyword cannot immediately follow a numeric literal. (4:21)
2 | /* tslint:disable */
3 | /* eslint-disable */
> 4 | import type * as 721Renderers from './721Renderers';
| ^
```
Contributor guide
Assessment
This issue has not been assessed yet.