We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A discussion point raised during recent refactoring. Should we export/import types with the Typescript, which we currently don't.
export/import
That's our current use case.
// module.ts type MyType = string | number; export { MyType };
and for import
import {MyType} from "./module.js"
TS recommends to use to type based export/import for types.
// module.ts type MyType = string | number; export { type MyType };
import type {MyType} from "./module.js"
This pattern have some advantages:
This pattern have some disadvantages:
type
https://biomejs.dev/linter/rules/use-export-type https://biomejs.dev/linter/rules/use-import-type
The text was updated successfully, but these errors were encountered:
this makes sense if you only import types from the file / module, this will completely remove it from dist
dist
Sorry, something went wrong.
We agree that we should do both of these things. And enforce them with linter rules.
nazarhussain
No branches or pull requests
Problem description
A discussion point raised during recent refactoring. Should we
export/import
types with the Typescript, which we currently don't.That's our current use case.
and for import
Solution description
TS recommends to use to type based export/import for types.
and for import
This pattern have some advantages:
This pattern have some disadvantages:
type
keyword for the types at time of import.Additional context
https://biomejs.dev/linter/rules/use-export-type
https://biomejs.dev/linter/rules/use-import-type
The text was updated successfully, but these errors were encountered: