summaryrefslogtreecommitdiff
path: root/cli/js/compiler_api.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/compiler_api.ts')
-rw-r--r--cli/js/compiler_api.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/cli/js/compiler_api.ts b/cli/js/compiler_api.ts
index 33748d2b8..3638046b6 100644
--- a/cli/js/compiler_api.ts
+++ b/cli/js/compiler_api.ts
@@ -247,7 +247,21 @@ export interface CompilerOptions {
| "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[];
}