mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
fix(cli): correct libs sent to tsc for unstable worker (#8260)
Fixes #8257
This commit is contained in:
parent
96e03e0b93
commit
5f7c80986f
5 changed files with 23 additions and 1 deletions
|
@ -551,7 +551,7 @@ impl Serialize for TypeLib {
|
|||
vec!["deno.window".to_string(), "deno.unstable".to_string()]
|
||||
}
|
||||
TypeLib::UnstableDenoWorker => {
|
||||
vec!["deno.worker".to_string(), "deno.worker".to_string()]
|
||||
vec!["deno.worker".to_string(), "deno.unstable".to_string()]
|
||||
}
|
||||
};
|
||||
Serialize::serialize(&value, serializer)
|
||||
|
|
|
@ -2792,6 +2792,11 @@ itest!(unstable_disabled_ts2551 {
|
|||
output: "unstable_disabled_ts2551.out",
|
||||
});
|
||||
|
||||
itest!(unstable_worker {
|
||||
args: "run --reload --unstable --quiet --allow-read unstable_worker.ts",
|
||||
output: "unstable_worker.ts.out",
|
||||
});
|
||||
|
||||
itest!(_053_import_compression {
|
||||
args: "run --quiet --reload --allow-net 053_import_compression/main.ts",
|
||||
output: "053_import_compression.out",
|
||||
|
|
5
cli/tests/subdir/worker_unstable.ts
Normal file
5
cli/tests/subdir/worker_unstable.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
console.log(Deno.permissions.query);
|
||||
console.log(Deno.compile);
|
||||
self.onmessage = () => {
|
||||
self.close();
|
||||
};
|
10
cli/tests/unstable_worker.ts
Normal file
10
cli/tests/unstable_worker.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
const w = new Worker(
|
||||
new URL("subdir/worker_unstable.ts", import.meta.url).href,
|
||||
{
|
||||
type: "module",
|
||||
deno: true,
|
||||
name: "Unstable Worker",
|
||||
},
|
||||
);
|
||||
|
||||
w.postMessage({});
|
2
cli/tests/unstable_worker.ts.out
Normal file
2
cli/tests/unstable_worker.ts.out
Normal file
|
@ -0,0 +1,2 @@
|
|||
[Function: query]
|
||||
[AsyncFunction: compile]
|
Loading…
Add table
Reference in a new issue