diff options
Diffstat (limited to 'cli/dts/lib.deno.window.d.ts')
-rw-r--r-- | cli/dts/lib.deno.window.d.ts | 16 |
1 files changed, 10 insertions, 6 deletions
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, |