From 496c9d73a11d3356bf1675e5ca44c10cd3c99939 Mon Sep 17 00:00:00 2001 From: tokiedokie <42903136+tokiedokie@users.noreply.github.com> Date: Sat, 15 Aug 2020 22:46:36 +0900 Subject: improve docs (#7053) --- docs/examples/os_signals.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/examples/os_signals.md') diff --git a/docs/examples/os_signals.md b/docs/examples/os_signals.md index 225d7301a..3b2411bde 100644 --- a/docs/examples/os_signals.md +++ b/docs/examples/os_signals.md @@ -5,7 +5,7 @@ [API Reference](https://doc.deno.land/https/raw.githubusercontent.com/denoland/deno/master/cli/dts/lib.deno.unstable.d.ts#Deno.signal) -You can use `Deno.signal()` function for handling OS signals. +You can use `Deno.signal()` function for handling OS signals: ```ts for await (const _ of Deno.signal(Deno.Signal.SIGINT)) { @@ -13,7 +13,7 @@ for await (const _ of Deno.signal(Deno.Signal.SIGINT)) { } ``` -`Deno.signal()` also works as a promise. +`Deno.signal()` also works as a promise: ```ts await Deno.signal(Deno.Signal.SIGINT); @@ -21,7 +21,7 @@ console.log("interrupted!"); ``` If you want to stop watching the signal, you can use `dispose()` method of the -signal object. +signal object: ```ts const sig = Deno.signal(Deno.Signal.SIGINT); @@ -34,4 +34,4 @@ for await (const _ of sig) { } ``` -The above for-await loop exits after 5 seconds when sig.dispose() is called. +The above for-await loop exits after 5 seconds when `sig.dispose()` is called. -- cgit v1.2.3