Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI Doesn't work with vite-dts, export syntax too new #900

Open
johnnyshankman opened this issue Apr 18, 2024 · 0 comments
Open

CLI Doesn't work with vite-dts, export syntax too new #900

johnnyshankman opened this issue Apr 18, 2024 · 0 comments

Comments

@johnnyshankman
Copy link

johnnyshankman commented Apr 18, 2024

The rolled up exports uses export * as ____ syntax and there's no way to turn it off. My type compiler vite:dts cannot understand the index.ts file that is produced because of this.

See: https://github.com/dethcrypto/TypeChain?tab=readme-ov-file#cli

error during build:
Error: [vite:dts] The "export * as ___" syntax is not supported yet; as a workaround, use "import * as ___" with a separate "export { ___ }" declaration
/Users/johnshankman/Documents/manifoldxyz/burn-redeem-contracts/dist/contracts/ethers/index.d.ts:10:8

There's no way to control how this is generated using the typechain command
Screenshot 2024-04-18 at 12 29 35 PM
Screenshot 2024-04-18 at 12 33 47 PM

Solution

Use older import * as syntax with export at the end of the file. That way there's 0 chance of ever having compatibility issues with outside packages like vite-dts etc. No need to use new school syntax on such a simple file being autogenerated.

@johnnyshankman johnnyshankman changed the title Doesn't work with vite-dts CLI Doesn't work with vite-dts Apr 18, 2024
@johnnyshankman johnnyshankman changed the title CLI Doesn't work with vite-dts CLI Doesn't work with vite-dts, export syntax too new Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant