1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

fix(dts): move BroadcastChannel type to lib.deno.unstable.d.ts (#19108)

This commit is contained in:
Yoshiya Hinosawa 2023-05-14 20:27:14 +09:00 committed by GitHub
parent 226a373c49
commit 6bea6b31d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 2 deletions

View file

@ -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();

View file

@ -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"
},

View file

@ -0,0 +1 @@
const _channel = new BroadcastChannel("foo");

View file

@ -0,0 +1,4 @@
error: TS2304 [ERROR]: Cannot find name 'BroadcastChannel'.
const _channel = new BroadcastChannel("foo");
~~~~~~~~~~~~~~~~
at [WILDCARD]

View file

@ -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 {

View file

@ -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