0
0
Fork 0
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:
Kitson Kelly 2020-11-06 12:10:19 +11:00 committed by GitHub
parent 96e03e0b93
commit 5f7c80986f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 1 deletions

View file

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

View file

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

View file

@ -0,0 +1,5 @@
console.log(Deno.permissions.query);
console.log(Deno.compile);
self.onmessage = () => {
self.close();
};

View 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({});

View file

@ -0,0 +1,2 @@
[Function: query]
[AsyncFunction: compile]