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(dts): move BroadcastChannel type to lib.deno.unstable.d.ts #19108

Merged
merged 4 commits into from May 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions cli/tests/integration/check_tests.rs
Expand Up @@ -84,6 +84,17 @@ itest!(check_no_error_truncation {
exit_code: 1,
});

itest!(check_broadcast_channel_stable {
args: "check --quiet check/broadcast_channel.ts",
output: "check/broadcast_channel.ts.error.out",
exit_code: 1,
});

itest!(check_broadcast_channel_unstable {
args: "check --quiet --unstable check/broadcast_channel.ts",
exit_code: 0,
});

#[test]
fn cache_switching_config_then_no_config() {
let context = TestContext::default();
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/integration/lsp_tests.rs
Expand Up @@ -4713,7 +4713,7 @@ fn lsp_completions_auto_import() {
"source": "./b.ts",
"data": {
"exportName": "foo",
"exportMapKey": "foo|6845|file:///a/b",
"exportMapKey": "foo|6806|file:///a/b",
"moduleSpecifier": "./b.ts",
"fileName": "file:///a/b.ts"
},
Expand Down
1 change: 1 addition & 0 deletions cli/tests/testdata/check/broadcast_channel.ts
@@ -0,0 +1 @@
const _channel = new BroadcastChannel("foo");
4 changes: 4 additions & 0 deletions cli/tests/testdata/check/broadcast_channel.ts.error.out
@@ -0,0 +1,4 @@
error: TS2304 [ERROR]: Cannot find name 'BroadcastChannel'.
const _channel = new BroadcastChannel("foo");
~~~~~~~~~~~~~~~~
at [WILDCARD]
1 change: 0 additions & 1 deletion cli/tsc/dts/lib.deno.shared_globals.d.ts
Expand Up @@ -11,7 +11,6 @@
/// <reference lib="deno.fetch" />
/// <reference lib="deno.websocket" />
/// <reference lib="deno.crypto" />
/// <reference lib="deno.broadcast_channel" />

/** @category WebAssembly */
declare namespace WebAssembly {
Expand Down
1 change: 1 addition & 0 deletions cli/tsc/dts/lib.deno.unstable.d.ts
Expand Up @@ -2,6 +2,7 @@

/// <reference no-default-lib="true" />
/// <reference lib="deno.ns" />
/// <reference lib="deno.broadcast_channel" />

declare namespace Deno {
export {}; // stop default export type behavior
Expand Down