diff options
author | Matt Dumler <mattd3v@pm.me> | 2020-05-18 14:53:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 15:53:25 -0400 |
commit | 88b24261ba467c20d4ef90224b07c19a71398f0f (patch) | |
tree | 0c5b47c766208877adc3a2afb16506c888d6e50b /docs/runtime | |
parent | 76ee5c780848a922dfc0ab8ac48096ab2262cc4a (diff) |
adjust docs (#5598)
Diffstat (limited to 'docs/runtime')
-rw-r--r-- | docs/runtime/compiler_apis.md | 2 | ||||
-rw-r--r-- | docs/runtime/program_lifecycle.md | 6 | ||||
-rw-r--r-- | docs/runtime/stability.md | 6 | ||||
-rw-r--r-- | docs/runtime/workers.md | 10 |
4 files changed, 12 insertions, 12 deletions
diff --git a/docs/runtime/compiler_apis.md b/docs/runtime/compiler_apis.md index 32a5e36a2..ebb14f6b3 100644 --- a/docs/runtime/compiler_apis.md +++ b/docs/runtime/compiler_apis.md @@ -19,7 +19,7 @@ fully qualified module name, and the value is the text source of the module. If not attempt to resolve them outside of Deno. If `sources` are not provided, Deno will resolve modules as if the root module had been passed on the command line. Deno will also cache any of these resources. All resolved resources are treated -as dynamic imports and require read or net permissions depending if they're +as dynamic imports and require read or net permissions depending on if they're local or remote. The `options` argument is a set of options of type `Deno.CompilerOptions`, which is a subset of the TypeScript compiler options containing the ones supported by Deno. diff --git a/docs/runtime/program_lifecycle.md b/docs/runtime/program_lifecycle.md index df8bbac65..4a94d6724 100644 --- a/docs/runtime/program_lifecycle.md +++ b/docs/runtime/program_lifecycle.md @@ -3,8 +3,8 @@ Deno supports browser compatible lifecycle events: `load` and `unload`. You can use these events to provide setup and cleanup code in your program. -Listener for `load` events can be asynchronous and will be awaited. Listener for -`unload` events need to be synchronous. Both events cannot be cancelled. +Listeners for `load` events can be asynchronous and will be awaited. Listeners +for `unload` events need to be synchronous. Both events cannot be cancelled. Example: @@ -51,7 +51,7 @@ console.log("log from imported script"); Note that you can use both `window.addEventListener` and `window.onload`/`window.onunload` to define handlers for events. There is a -major difference between them, let's run example: +major difference between them, let's run the example: ```shell $ deno run main.ts diff --git a/docs/runtime/stability.md b/docs/runtime/stability.md index cd7c27039..7fcc0f0b0 100644 --- a/docs/runtime/stability.md +++ b/docs/runtime/stability.md @@ -1,10 +1,10 @@ ## Stability -As of Deno 1.0.0, the `Deno` namespace APIs are stable. That means that we will +As of Deno 1.0.0, the `Deno` namespace APIs are stable. That means we will strive to make code working under 1.0.0 continue to work in future versions. However, not all of Deno's features are ready for production yet. Features which -are not ready because they are still in draft phase are locked behind the +are not ready, because they are still in draft phase, are locked behind the `--unstable` command line flag. Passing this flag does a few things: - It enables the use of unstable APIs during runtime. @@ -14,7 +14,7 @@ are not ready because they are still in draft phase are locked behind the This includes the output of `deno types`. You should be aware that unstable APIs have probably **not undergone a security -review**, are likely to have **breaking API changes** in the future and are +review**, are likely to have **breaking API changes** in the future, and are **not ready for production**. Furthermore Deno's standard modules (https://deno.land/std/) are not yet stable. diff --git a/docs/runtime/workers.md b/docs/runtime/workers.md index 3df712275..89541cee7 100644 --- a/docs/runtime/workers.md +++ b/docs/runtime/workers.md @@ -7,7 +7,7 @@ Workers can be used to run code on multiple threads. Each instance of `Worker` is run on a separate thread, dedicated only to that worker. Currently Deno supports only `module` type workers; thus it's essential to pass -`type: "module"` option when creating new worker: +`type: "module"` option when creating a new worker: ```ts // Good @@ -66,9 +66,9 @@ hello world > This is an unstable Deno feature. Learn more about > [unstable features](./stability.md). -By default `Deno` namespace is not available in worker scope. +By default the `Deno` namespace is not available in worker scope. -To add `Deno` namespace pass `deno: true` option when creating new worker: +To add the `Deno` namespace pass `deno: true` option when creating new worker: ```ts // main.js @@ -92,7 +92,7 @@ $ deno run --allow-read --unstable main.js hello world ``` -When `Deno` namespace is available in worker scope; the worker inherits parent -process permissions (the ones specified using `--allow-*` flags). +When the `Deno` namespace is available in worker scope, the worker inherits its +parent process' permissions (the ones specified using `--allow-*` flags). We intend to make permissions configurable for workers. |