mirror of
https://github.com/denoland/deno.git
synced 2024-11-23 15:16:54 -05:00
14 lines
268 B
TypeScript
14 lines
268 B
TypeScript
|
const blob = new Blob(
|
||
|
[
|
||
|
"enum A {\n A,\n B,\n C,\n }\n \n export function a() {\n throw new Error(`Hello ${A.C}`);\n }\n ",
|
||
|
],
|
||
|
{
|
||
|
type: "application/typescript",
|
||
|
},
|
||
|
);
|
||
|
const url = URL.createObjectURL(blob);
|
||
|
|
||
|
const { a } = await import(url);
|
||
|
|
||
|
a();
|