summaryrefslogtreecommitdiff
path: root/cli/dts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/dts')
-rw-r--r--cli/dts/lib.deno.ns.d.ts10
-rw-r--r--cli/dts/lib.deno.window.d.ts16
2 files changed, 16 insertions, 10 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index d759bdd58..14cf2a316 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -2910,11 +2910,13 @@ declare namespace Deno {
* If `pid` is negative, the signal will be sent to the process group
* identified by `pid`.
*
- * const p = Deno.run({
- * cmd: ["sleep", "10000"]
- * });
+ * ```ts
+ * const p = Deno.run({
+ * cmd: ["sleep", "10000"]
+ * });
*
- * Deno.kill(p.pid, "SIGINT");
+ * Deno.kill(p.pid, "SIGINT");
+ * ```
*
* Requires `allow-run` permission. */
export function kill(pid: number, signo: Signal): void;
diff --git a/cli/dts/lib.deno.window.d.ts b/cli/dts/lib.deno.window.d.ts
index 1c8cdeae8..fbd0a967b 100644
--- a/cli/dts/lib.deno.window.d.ts
+++ b/cli/dts/lib.deno.window.d.ts
@@ -71,9 +71,11 @@ declare function prompt(message?: string, defaultValue?: string): string | null;
/** Registers an event listener in the global scope, which will be called
* synchronously whenever the event `type` is dispatched.
*
- * addEventListener('unload', () => { console.log('All finished!'); });
- * ...
- * dispatchEvent(new Event('unload'));
+ * ```ts
+ * addEventListener('unload', () => { console.log('All finished!'); });
+ * ...
+ * dispatchEvent(new Event('unload'));
+ * ```
*/
declare function addEventListener(
type: string,
@@ -83,9 +85,11 @@ declare function addEventListener(
/** Remove a previously registered event listener from the global scope
*
- * const lstnr = () => { console.log('hello'); };
- * addEventListener('load', lstnr);
- * removeEventListener('load', lstnr);
+ * ```ts
+ * const listener = () => { console.log('hello'); };
+ * addEventListener('load', listener);
+ * removeEventListener('load', listener);
+ * ```
*/
declare function removeEventListener(
type: string,