diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2023-05-14 20:27:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-14 20:27:14 +0900 |
commit | 6bea6b31d3b502165e7e890c889919d67df1a795 (patch) | |
tree | c73a589905eb62f835bfb12c28063ae067f6ab26 | |
parent | 226a373c497cc3439e032332fefaffa75211afbd (diff) |
fix(dts): move BroadcastChannel type to lib.deno.unstable.d.ts (#19108)
-rw-r--r-- | cli/tests/integration/check_tests.rs | 11 | ||||
-rw-r--r-- | cli/tests/integration/lsp_tests.rs | 2 | ||||
-rw-r--r-- | cli/tests/testdata/check/broadcast_channel.ts | 1 | ||||
-rw-r--r-- | cli/tests/testdata/check/broadcast_channel.ts.error.out | 4 | ||||
-rw-r--r-- | cli/tsc/dts/lib.deno.shared_globals.d.ts | 1 | ||||
-rw-r--r-- | cli/tsc/dts/lib.deno.unstable.d.ts | 1 |
6 files changed, 18 insertions, 2 deletions
diff --git a/cli/tests/integration/check_tests.rs b/cli/tests/integration/check_tests.rs index 84ddd53be..84ed92990 100644 --- a/cli/tests/integration/check_tests.rs +++ b/cli/tests/integration/check_tests.rs @@ -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(); diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs index 500a27ed2..656ec9ade 100644 --- a/cli/tests/integration/lsp_tests.rs +++ b/cli/tests/integration/lsp_tests.rs @@ -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" }, diff --git a/cli/tests/testdata/check/broadcast_channel.ts b/cli/tests/testdata/check/broadcast_channel.ts new file mode 100644 index 000000000..6c75b4a8e --- /dev/null +++ b/cli/tests/testdata/check/broadcast_channel.ts @@ -0,0 +1 @@ +const _channel = new BroadcastChannel("foo"); diff --git a/cli/tests/testdata/check/broadcast_channel.ts.error.out b/cli/tests/testdata/check/broadcast_channel.ts.error.out new file mode 100644 index 000000000..baa6727e3 --- /dev/null +++ b/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] diff --git a/cli/tsc/dts/lib.deno.shared_globals.d.ts b/cli/tsc/dts/lib.deno.shared_globals.d.ts index d0b44f58a..69850f0b2 100644 --- a/cli/tsc/dts/lib.deno.shared_globals.d.ts +++ b/cli/tsc/dts/lib.deno.shared_globals.d.ts @@ -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 { diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index 8613da2ab..e70d50820 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -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 |