Skip to content

fix(check): ignore errors on ambient modules #29135

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

Merged

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented May 2, 2025

Continued from #27633

This PR makes deno check ignore Cannot find module diagnostic if the missing module specifier matches one of ambient module pattern. (For example if there's declare module "*.svg" { ... } declaration in one of d.ts files, importing of <any>.svg doesn't cause type error with this change. This is necessary for passing the type checking of default vite template.)

LSP already implements this in #27855

closes #28455

@kt3k kt3k requested review from dsherret and nathanwhit May 2, 2025 07:42
@kt3k kt3k removed request for dsherret and nathanwhit May 2, 2025 09:03
@kt3k kt3k marked this pull request as draft May 2, 2025 09:03
@kt3k kt3k added the ci-draft Run the CI on draft PRs. label May 2, 2025
@kt3k
Copy link
Member Author

kt3k commented May 2, 2025

Looks like now the hints for bare node builtin imports are missing.. resolved

@kt3k kt3k requested a review from dsherret May 15, 2025 08:57
@kt3k kt3k assigned nathanwhit and unassigned nathanwhit May 15, 2025
@kt3k kt3k requested a review from nathanwhit May 15, 2025 08:58
@kt3k kt3k marked this pull request as ready for review May 15, 2025 08:58
Copy link
Member

@nathanwhit nathanwhit left a comment

Choose a reason for hiding this comment

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

Nice, LGTM!

Only comment is that we probably need to apply this to other subcommands, depending on whether we're going to do typechecking.

@kt3k kt3k merged commit 637bcff into denoland:main May 16, 2025
32 of 35 checks passed
@kt3k kt3k deleted the fix_ignore_errors_on_ambient_modules_deno_check_2 branch May 16, 2025 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-draft Run the CI on draft PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vite should type-check out of the box
3 participants