-
Notifications
You must be signed in to change notification settings - Fork 0
Make tsgo required when importing from .ts files #978
Copy link
Copy link
Open
Description
Currently tsgo is optional - when missing, the compiler silently falls back to unknown types for all TS imports. This leads to confusing downstream errors (unknown bindings, wrong type-only imports, missing type info in hover).
Proposal
When a .fl file imports from a .ts file and tsgo is not installed, emit a hard error:
error: tsgo is required to resolve TypeScript imports
--> src/components/board.fl:8:1
|
8 | import trusted { useJiraStore } from "../../stores/jira-store"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: install with: npm i -g @typescript/native-preview
npm imports (from node_modules) could remain soft-warning since they have .d.ts files that can be parsed without tsgo.
Why not bundle tsgo
- Version coupling (tsgo is actively developed, would go stale)
- Binary size increase
- tsgo is a TS team project, not ours to redistribute
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels