mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
feat: Support types compiler option in compiler APIs (#4155)
Handles `types` in the compiler APIs to make it easier to supply external type libraries.
This commit is contained in:
parent
daf7617f42
commit
1d26da6a47
6 changed files with 91 additions and 7 deletions
16
cli/js/lib.deno.ns.d.ts
vendored
16
cli/js/lib.deno.ns.d.ts
vendored
|
@ -2156,7 +2156,21 @@ declare namespace Deno {
|
|||
| "es2020"
|
||||
| "esnext";
|
||||
|
||||
/** List of names of type definitions to include. Defaults to `undefined`. */
|
||||
/** List of names of type definitions to include. Defaults to `undefined`.
|
||||
*
|
||||
* The type definitions are resolved according to the normal Deno resolution
|
||||
* irrespective of if sources are provided on the call. Like other Deno
|
||||
* modules, there is no "magical" resolution. For example:
|
||||
*
|
||||
* Deno.compile(
|
||||
* "./foo.js",
|
||||
* undefined,
|
||||
* {
|
||||
* types: [ "./foo.d.ts", "https://deno.land/x/example/types.d.ts" ]
|
||||
* }
|
||||
* );
|
||||
*
|
||||
*/
|
||||
types?: string[];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue