Skip to content
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

fix(check): include dts files in tsc roots #18026

Merged
merged 2 commits into from
Mar 5, 2023

Conversation

nayeemrmn
Copy link
Collaborator

Currently declaration files aren't included in type checking unless as a dependency of a module. This affects entrypoint .d.ts modules, the X-TypeScript-Types/<reference types="./foo.d.ts" /> of a JS entrypoint module and doc tests of untagged code blocks within a .d.ts module.

The last one exposed that there were some untagged code blocks in lib.deno.ns.d.ts which would be wrongly checked in ambient mode due to the inherited virtual file extension being .d.ts. I've added those tags and also removed the unsafe default which causes that to happen.

@bartlomieju bartlomieju requested a review from dsherret March 5, 2023 11:47
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too. Thanks, Nayeem!

@dsherret dsherret merged commit 273777f into denoland:main Mar 5, 2023
@nayeemrmn nayeemrmn deleted the tsc-roots-include-dts branch March 6, 2023 19:21
@Hexagon
Copy link

Hexagon commented Mar 10, 2023

@nayeemrmn

Just dropping a note. Not sure if related, but when upgrading from 1.31.1 to 1.31.2 i get a type checking error that indicates that .d.ts is somehow included twice.

More info in new issue #18117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants