mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 00:29:09 -05:00
Fix typos (#7687)
This commit is contained in:
parent
ab96619cd6
commit
e0d4696a72
2 changed files with 6 additions and 6 deletions
|
@ -11,7 +11,7 @@ The following functions and class are exposed in `mod.ts`
|
||||||
Creates a Promise with the `reject` and `resolve` functions.
|
Creates a Promise with the `reject` and `resolve` functions.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { deferred } from "https://deno.land.std/async/mod.ts";
|
import { deferred } from "https://deno.land/std/async/mod.ts";
|
||||||
|
|
||||||
const p = deferred<number>();
|
const p = deferred<number>();
|
||||||
// ...
|
// ...
|
||||||
|
@ -23,7 +23,7 @@ p.resolve(42);
|
||||||
Resolve a Promise after a given amount of milliseconds
|
Resolve a Promise after a given amount of milliseconds
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { delay } from "https://deno.land.std/async/mod.ts";
|
import { delay } from "https://deno.land/std/async/mod.ts";
|
||||||
|
|
||||||
// ...
|
// ...
|
||||||
const delayedPromise = delay(100);
|
const delayedPromise = delay(100);
|
||||||
|
@ -41,7 +41,7 @@ yielded from the iterator) does not matter. If there is any result, it is
|
||||||
discarded.
|
discarded.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { MuxAsyncIterator } from "https://deno.land.std/async/mod.ts";
|
import { MuxAsyncIterator } from "https://deno.land/std/async/mod.ts";
|
||||||
|
|
||||||
async function* gen123(): AsyncIterableIterator<number> {
|
async function* gen123(): AsyncIterableIterator<number> {
|
||||||
yield 1;
|
yield 1;
|
||||||
|
@ -71,7 +71,7 @@ transforms are done concurrently, with a max concurrency defined by the
|
||||||
poolLimit.
|
poolLimit.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { pooledMap } from "https://deno.land.std/async/mod.ts";
|
import { pooledMap } from "https://deno.land/std/async/mod.ts";
|
||||||
|
|
||||||
const results = pooledMap(
|
const results = pooledMap(
|
||||||
2,
|
2,
|
||||||
|
|
|
@ -12,7 +12,7 @@ Generates an AsyncIterable which can be awaited on for one or more signals.
|
||||||
`dispose()` can be called when you are finished waiting on the events.
|
`dispose()` can be called when you are finished waiting on the events.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { signal } from "https://deno.land.std/signal/mod.ts";
|
import { signal } from "https://deno.land/std/signal/mod.ts";
|
||||||
const sig = signal(Deno.Signal.SIGUSR1, Deno.Signal.SIGINT);
|
const sig = signal(Deno.Signal.SIGUSR1, Deno.Signal.SIGINT);
|
||||||
setTimeout(() => {}, 5000); // Prevents exiting immediately
|
setTimeout(() => {}, 5000); // Prevents exiting immediately
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ sig.dispose();
|
||||||
Registers a callback function to be called on triggering of a signal event.
|
Registers a callback function to be called on triggering of a signal event.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { onSignal } from "https://deno.land.std/signal/mod.ts";
|
import { onSignal } from "https://deno.land/std/signal/mod.ts";
|
||||||
|
|
||||||
const handle = onSignal(Deno.Signal.SIGINT, () => {
|
const handle = onSignal(Deno.Signal.SIGINT, () => {
|
||||||
// ...
|
// ...
|
||||||
|
|
Loading…
Reference in a new issue