-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
bug: Generated command comportnent code has error in import statement when using TypeScript #66
Comments
whats your templates/command.ts.sapphire file? |
it should work fine i see a test.ts was it generated from cli? |
The test.ts is the same as foo.ts. There is probably a problem with the code here, so fix it and send a pull request. |
Normally this should not cause an issue because the TypeScript compiler removes the import when compiling if it's only used as a type. Are you sure this is not an ESLint issue? But to be consistent with the sapphiredev/examples repo I'm going to merge the PR. |
I didn't know about the behavior of the TypeScript compiler for type-only imports. |
Is there an existing issue for this?
Description of the bug
When I generate a command component using the CLI, the type prefix is missing from the import statement, causing an error.
The other components (listener, arguments, precondition), this error did not occur.
Steps To Reproduce
Expected behavior
It should generate code like this.
Screenshots
No response
Additional context
This is the first time for me to make an issue, and I used machine translation,
so I really apologize if there are any confusing parts.
The text was updated successfully, but these errors were encountered: