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
Astro v4.15.11 Node v21.7.3 System macOS (arm64) Package Manager npm Output static Adapter none Integrations @astrojs/tailwind @astrojs/react
No response
I have encountered the same bug that was fixed three years ago: #3787
In an astro component, it is not possible to import an interface or a type from a typescript file.
The behaviour is the same:
.ts
import x from "./x.ts"
import x from "./x"
export type
The only difference is that the “Weird workaround” (to add any other non-TS export in the file) does not work anymore.
Interfaces and types should be able to be imported as it is convenient to use these repeatable items in different components.
https://stackblitz.com/edit/github-dkmvrf?file=src%2Fpages%2Findex.astro
The text was updated successfully, but these errors were encountered:
TypeScript types don't have runtime values, as such it's normal that they'll always be undefined when trying to console.log them.
In an editor with intellisense, you'll get a warning when trying to do so:
The actual type works fine:
Sorry, something went wrong.
No branches or pull requests
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I have encountered the same bug that was fixed three years ago: #3787
In an astro component, it is not possible to import an interface or a type from a typescript file.
The behaviour is the same:
.ts
is included or not (import x from "./x.ts"
vsimport x from "./x"
);export type
nor `export interface;The only difference is that the “Weird workaround” (to add any other non-TS export in the file) does not work anymore.
What's the expected result?
Interfaces and types should be able to be imported as it is convenient to use these repeatable items in different components.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-dkmvrf?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: