-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
kt3k
merged 20 commits into
denoland:main
from
kt3k:fix_ignore_errors_on_ambient_modules_deno_check_2
May 16, 2025
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c888f22
fix(check): ignore errors on ambient modules
dsherret 46c127c
Merge branch 'main' into fix_ignore_errors_on_ambient_modules_deno_check
kt3k cadc0c2
fix
kt3k c8ad05c
ignore missing diagnostics
kt3k 4e57186
share regex between check and lsp
kt3k bf68bdd
add test cases
kt3k 9a7b35c
modify test cases
kt3k 5929861
add comment
kt3k 0a62655
fix lint
kt3k 4b58f80
fix deno install with missing package
kt3k c17ef60
Merge branch 'main' into fix_ignore_errors_on_ambient_modules_deno_ch…
kt3k dfc9a5e
do not ignore InvalidSpecifier
kt3k aa1d8a4
fix lint
kt3k 7133794
fix lint
kt3k edd269b
fix tsc::tests::test_respond
kt3k 84c5882
add missing_specifier field to Diagnostic
kt3k 1b34845
fix expectation for windows
kt3k 4f745ec
fix expectation for windows
kt3k 0c29182
clean up
kt3k a4ddb70
Merge branch 'main' into fix_ignore_errors_on_ambient_modules_deno_ch…
kt3k File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"steps": [{ | ||
"args": "check foo.ts", | ||
"output": "foo.out" | ||
}, { | ||
"args": "check bar.ts", | ||
"output": "bar.out", | ||
"exitCode": 1 | ||
}, { | ||
"args": "run foo.ts", | ||
"output": "run.out", | ||
"exitCode": 1 | ||
}, { | ||
"args": "run bar.ts", | ||
"output": "run.out", | ||
"exitCode": 1 | ||
}, { | ||
"args": "check bare_specifier.ts", | ||
"output": "bare_specifier.out", | ||
"exitCode": 1 | ||
}] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Check file:///[WILDLINE]/ambient_modules/bar.ts | ||
TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]logo.svg'. | ||
at file:///[WILDLINE]/ambient_modules/bar.ts:1:18 | ||
|
||
error: Type checking failed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import logo from "/logo.svg"; | ||
console.log(logo); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
error: Relative import path "foo" not prefixed with / or ./ or ../ | ||
hint: If you want to use a JSR or npm package, try running `deno add jsr:foo` or `deno add npm:foo` | ||
at file:///[WILDLINE]bare_specifier.ts:1:8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "foo"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Check file:///[WILDLINE]/ambient_modules/foo.ts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="./modules.d.ts" /> | ||
import logo from "/logo.svg"; | ||
import "./global.css"; | ||
import styles from "./styles.module.css"; | ||
console.log(logo, styles.classes); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
declare module "*.svg" { | ||
const content: string; | ||
export default content; | ||
} | ||
declare module "*.module.css" { | ||
const classes: { readonly [key: string]: string }; | ||
export default classes; | ||
} | ||
declare module "*.css" {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
error: Module not found "file:///[WILDLINE]logo.svg". | ||
at file:///[WILDLINE]/ambient_modules/[WILDLINE].ts:[WILDLINE] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.