diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2021-04-25 21:54:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-26 06:54:57 +1000 |
commit | fb1ccc3d8898e71f068a3d2e2b0e5f1da5731444 (patch) | |
tree | 136206913b6ab45daaf097439f4d3640e0746fd4 /docs/typescript | |
parent | 83bece56b01f6997cb71e9289a4d83a398cde0c8 (diff) |
refactor(cli): rename Deno.emit() bundle options to "module" and "classic" (#10332)
Diffstat (limited to 'docs/typescript')
-rw-r--r-- | docs/typescript/runtime.md | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/typescript/runtime.md b/docs/typescript/runtime.md index aa45b2521..c672dafd8 100644 --- a/docs/typescript/runtime.md +++ b/docs/typescript/runtime.md @@ -23,10 +23,10 @@ The emit options are defined in the `Deno` namespace as: ```ts interface EmitOptions { /** Indicate that the source code should be emitted to a single file - * JavaScript bundle that is a single ES module (`"esm"`) or a single file - * self contained script we executes in an immediately invoked function - * when loaded (`"iife"`). */ - bundle?: "esm" | "iife"; + * JavaScript bundle that is a single ES module (`"module"`) or a single + * file self contained script we executes in an immediately invoked function + * when loaded (`"classic"`). */ + bundle?: "module" | "classic"; /** If `true` then the sources will be typed checked, returning any * diagnostic errors in the result. If `false` type checking will be * skipped. Defaults to `true`. @@ -181,13 +181,13 @@ if (diagnostics.length) { ### Bundling `Deno.emit()` is also capable of providing output similar to `deno bundle` on -the command line. This is enabled by setting the _bundle_ option to `"esm"` or -`"iife"`. Currently Deno supports bundling as a single file ES module (`"esm"`) -or a single file self contained legacy script (`"iife"`). +the command line. This is enabled by setting the _bundle_ option to `"module"` +or `"classic"`. Currently Deno supports bundling as a single file ES module +(`"module"`) or a single file self contained legacy script (`"classic"`). ```ts const { files, diagnostics } = await Deno.emit("./mod.ts", { - bundle: "esm", + bundle: "module", }); ``` @@ -215,7 +215,7 @@ version of _lodash_ I am using with my project. I could do the following: ```ts const { files } = await Deno.emit("mod.ts", { - bundle: "esm", + bundle: "module", importMap: { imports: { "lodash": "https://deno.land/x/lodash", |