diff options
Diffstat (limited to 'tests/specs')
7 files changed, 44 insertions, 2 deletions
diff --git a/tests/specs/check/export_equals_declaration_file/__test__.jsonc b/tests/specs/check/export_equals_declaration_file/__test__.jsonc new file mode 100644 index 000000000..d69543a47 --- /dev/null +++ b/tests/specs/check/export_equals_declaration_file/__test__.jsonc @@ -0,0 +1,10 @@ +{ + "steps": [{ + "args": "check main.ts", + "output": "main.out" + }, { + // ensure diagnostic is not cached + "args": "check main.ts", + "output": "main.out" + }] +} diff --git a/tests/specs/check/export_equals_declaration_file/main.out b/tests/specs/check/export_equals_declaration_file/main.out new file mode 100644 index 000000000..70b7d2fe6 --- /dev/null +++ b/tests/specs/check/export_equals_declaration_file/main.out @@ -0,0 +1,6 @@ +Check file:///[WILDLINE]/main.ts +TS1203 [WARN]: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. This will start erroring in a future version of Deno 2 in order to align with TypeScript. +export = other; +~~~~~~~~~~~~~~~ + at file:///[WILDLINE]/other.d.ts:1:1 + diff --git a/tests/specs/check/export_equals_declaration_file/main.ts b/tests/specs/check/export_equals_declaration_file/main.ts new file mode 100644 index 000000000..e20a735d5 --- /dev/null +++ b/tests/specs/check/export_equals_declaration_file/main.ts @@ -0,0 +1,6 @@ +// @deno-types="./other.d.ts" +import Test, { type Attributes } from "./other.js"; + +const other: Attributes = {}; +console.log(Test()); +console.log(other); diff --git a/tests/specs/check/export_equals_declaration_file/other.d.ts b/tests/specs/check/export_equals_declaration_file/other.d.ts new file mode 100644 index 000000000..5e1274fa5 --- /dev/null +++ b/tests/specs/check/export_equals_declaration_file/other.d.ts @@ -0,0 +1,9 @@ +export = other; + +declare function other(): string; + +declare namespace other { + interface Attributes { + [attr: string]: string; + } +} diff --git a/tests/specs/check/export_equals_declaration_file/other.js b/tests/specs/check/export_equals_declaration_file/other.js new file mode 100644 index 000000000..f66c03162 --- /dev/null +++ b/tests/specs/check/export_equals_declaration_file/other.js @@ -0,0 +1,3 @@ +export default function other() { + return "test"; +} diff --git a/tests/specs/publish/bare_node_builtins/bare_node_builtins.out b/tests/specs/publish/bare_node_builtins/bare_node_builtins.out index 2a12eb6de..36ba9c7ce 100644 --- a/tests/specs/publish/bare_node_builtins/bare_node_builtins.out +++ b/tests/specs/publish/bare_node_builtins/bare_node_builtins.out @@ -1,7 +1,11 @@ Warning Resolving "url" as "node:url" at file:///[WILDLINE]/mod.ts:1:22. If you want to use a built-in Node module, add a "node:" prefix. Warning Resolving "url" as "node:url" at file:///[WILDLINE]/mod.ts:1:22. If you want to use a built-in Node module, add a "node:" prefix. +[UNORDERED_START] Download http://localhost:4260/@types/node -Download http://localhost:4260/@types/node/node-18.16.19.tgz +Download http://localhost:4260/undici-types +Download http://localhost:4260/@types/node/node-22.5.4.tgz +Download http://localhost:4260/undici-types/undici-types-6.19.8.tgz +[UNORDERED_END] Check file:///[WILDLINE]/mod.ts Checking for slow types in the public API... Check file:///[WILDLINE]/mod.ts diff --git a/tests/specs/publish/node_specifier/node_specifier.out b/tests/specs/publish/node_specifier/node_specifier.out index 3c0bc48d8..4c9d7cb3e 100644 --- a/tests/specs/publish/node_specifier/node_specifier.out +++ b/tests/specs/publish/node_specifier/node_specifier.out @@ -1,5 +1,9 @@ +[UNORDERED_START] Download http://localhost:4260/@types/node -Download http://localhost:4260/@types/node/node-[WILDCARD].tgz +Download http://localhost:4260/undici-types +Download http://localhost:4260/@types/node/node-22.5.4.tgz +Download http://localhost:4260/undici-types/undici-types-6.19.8.tgz +[UNORDERED_END] Check file:///[WILDCARD]/mod.ts Checking for slow types in the public API... Check file:///[WILDCARD]/publish/node_specifier/mod.ts |