mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
refactor(cli): runtime compiler APIs consolidated to Deno.emit() (#8799)
Closes: #4752
This commit is contained in:
parent
5f4e1767fe
commit
012f99bd9a
14 changed files with 592 additions and 516 deletions
|
@ -1,12 +1,14 @@
|
|||
const [errors, program] = await Deno.compile(
|
||||
const { diagnostics, files } = await Deno.emit(
|
||||
"/main.ts",
|
||||
{
|
||||
"/main.ts": `document.getElementById("foo");`,
|
||||
},
|
||||
{
|
||||
lib: ["dom", "esnext"],
|
||||
sources: {
|
||||
"/main.ts": `document.getElementById("foo");`,
|
||||
},
|
||||
compilerOptions: {
|
||||
lib: ["dom", "esnext"],
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
console.log(errors);
|
||||
console.log(Object.keys(program).sort());
|
||||
console.log(diagnostics);
|
||||
console.log(Object.keys(files).sort());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue