Skip to content

Determine correct moduleDetection compiler option (TypeScript 4.7) #13924

Closed
@kitsonk

Description

@kitsonk

Ref: microsoft/TypeScript#47495

The next minor release of TypeScript (4.7) should include a new moduleDetection option, which has to deal with how modules are detected by TypeScript when type checking. The default is "auto", which might be ok for us, but also there is "force" which is more the behaviour that we would expect for code running under Deno. We need to do a bit of experiment and testing.

The issue mostly manifested itself around issues in the lsp when having a file open with no top level import or export statement being treated a global script for type checking purposes. There were also some issues with emitting @jsxImportSource with modules that appeared to be scripts.

Metadata

Metadata

Assignees

Labels

featnew feature (which has been agreed to/accepted)tscrelated to the TypeScript tsc compiler

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions