mirror of
https://github.com/denoland/deno.git
synced 2025-09-21 18:10:02 +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
4
cli/js/lib.deno.ns.d.ts
vendored
4
cli/js/lib.deno.ns.d.ts
vendored
|
@ -2093,7 +2093,7 @@ declare namespace Deno {
|
|||
rootName: string,
|
||||
sources?: Record<string, string>,
|
||||
options?: CompilerOptions
|
||||
): Promise<[Diagnostic | undefined, Record<string, string>]>;
|
||||
): Promise<[DiagnosticItem[] | undefined, Record<string, string>]>;
|
||||
|
||||
/** UNSTABLE: new API, yet to be vetted.
|
||||
*
|
||||
|
@ -2129,7 +2129,7 @@ declare namespace Deno {
|
|||
rootName: string,
|
||||
sources?: Record<string, string>,
|
||||
options?: CompilerOptions
|
||||
): Promise<[Diagnostic | undefined, string]>;
|
||||
): Promise<[DiagnosticItem[] | undefined, string]>;
|
||||
|
||||
/** Returns the script arguments to the program. If for example we run a program
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue