mirror of
https://github.com/denoland/deno.git
synced 2025-07-22 20:55:08 +00:00
Improve support for diagnostics from runtime compiler APIs (#3911)
- Exports diagnostic items from `diagnostics.ts` which are missing at runtime. - Returns an array of diagnostics, instead of an object with a property of `items`. This is because of the way Rust deals with certain structures, and shouldn't be exposed in the APIs.
This commit is contained in:
parent
5a8ba3b114
commit
ea6179f7dc
6 changed files with 66 additions and 48 deletions
|
@ -255,7 +255,9 @@ async function tsCompilerOnMessage({
|
|||
|
||||
assert(emitResult.emitSkipped === false, "Unexpected skip of the emit.");
|
||||
const result = [
|
||||
diagnostics.length ? fromTypeScriptDiagnostic(diagnostics) : undefined,
|
||||
diagnostics.length
|
||||
? fromTypeScriptDiagnostic(diagnostics).items
|
||||
: undefined,
|
||||
bundle ? state.emitBundle : state.emitMap
|
||||
];
|
||||
globalThis.postMessage(result);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue