Skip to content

Commit

Permalink
fix(dts): move BroadcastChannel type to lib.deno.unstable.d.ts (denol…
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k authored May 14, 2023
1 parent 226a373 commit 6bea6b3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 2 deletions.
11 changes: 11 additions & 0 deletions cli/tests/integration/check_tests.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -4713,7 +4713,7 @@ fn lsp_completions_auto_import() {
"source": "./b.ts",
"data": {
"exportName": "foo",
"exportMapKey": "foo|6845|file:https:///a/b",
"exportMapKey": "foo|6806|file:https:///a/b",
"moduleSpecifier": "./b.ts",
"fileName": "file:https:///a/b.ts"
},
Expand Down
1 change: 1 addition & 0 deletions cli/tests/testdata/check/broadcast_channel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const _channel = new BroadcastChannel("foo");
4 changes: 4 additions & 0 deletions cli/tests/testdata/check/broadcast_channel.ts.error.out
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 6bea6b3

Please sign in to comment.