mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -05:00
f248050cb4
This change aims to replace all relative import specifiers targeted at `tests/util/std` with mapped ones (using a `deno.json` file). Towards updating the `std` git submodule.
16 lines
383 B
TypeScript
16 lines
383 B
TypeScript
import { assert } from "@std/assert/mod.ts";
|
|
|
|
onmessage = function (e) {
|
|
if (typeof self.Deno === "undefined") {
|
|
throw new Error("Deno namespace not available in worker");
|
|
}
|
|
|
|
assert(!Object.isFrozen(self.Deno));
|
|
|
|
const desc = Object.getOwnPropertyDescriptor(self, "Deno");
|
|
assert(desc);
|
|
assert(desc.configurable);
|
|
assert(!desc.writable);
|
|
|
|
postMessage(e.data);
|
|
};
|