From d632cce129cb7025a34cf0aa7262a38fb12f47c4 Mon Sep 17 00:00:00 2001 From: ud2 Date: Tue, 4 Jul 2023 02:36:55 +0800 Subject: fix(dts): make globals available on globalThis (#19438) This PR changes Web IDL interfaces to be declared with `var` instead of `class`, so that accessing them via `globalThis` does not raise type errors. Closes #13390. --- cli/tests/integration/lsp_tests.rs | 2 +- cli/tests/unit/cache_api_test.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'cli/tests') diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs index d6a8b4757..b4339679f 100644 --- a/cli/tests/integration/lsp_tests.rs +++ b/cli/tests/integration/lsp_tests.rs @@ -4788,7 +4788,7 @@ fn lsp_completions_auto_import() { "source": "./b.ts", "data": { "exportName": "foo", - "exportMapKey": "foo|6820|file:///a/b", + "exportMapKey": "foo|6893|file:///a/b", "moduleSpecifier": "./b.ts", "fileName": "file:///a/b.ts" }, diff --git a/cli/tests/unit/cache_api_test.ts b/cli/tests/unit/cache_api_test.ts index 2f807de44..c1bd7031e 100644 --- a/cli/tests/unit/cache_api_test.ts +++ b/cli/tests/unit/cache_api_test.ts @@ -97,7 +97,6 @@ Deno.test(async function cacheApi() { }); Deno.test(function cacheIllegalConstructor() { - // @ts-expect-error illegal constructor assertThrows(() => new Cache(), TypeError, "Illegal constructor"); // @ts-expect-error illegal constructor assertThrows(() => new Cache("foo", "bar"), TypeError, "Illegal constructor"); -- cgit v1.2.3