Skip to content

Commit d4321d7

Browse files
author
Jake Champion
committed
chore: add types for new console methods
1 parent 80ed0fe commit d4321d7

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

types/globals.d.ts

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ declare interface BackendConfiguration {
6868
firstByteTimeout?: number,
6969
/**
7070
* Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.
71-
* If exceeded, the response received so far will be considered complete and the fetch will end.
71+
* If exceeded, the response received so far will be considered complete and the fetch will end.
7272
* Defaults to 10,000 milliseconds.
7373
*/
7474
betweenBytesTimeout?: number,
@@ -608,12 +608,26 @@ declare class URLSearchParams {
608608
* **Note**: Messages are prefixed with the respective log level, starting with an upper-case letter, e.g. `"Log: "`.
609609
* @group Console API
610610
*/
611-
declare interface Console {
612-
log(...objects: any[]): void;
613-
debug(...objects: any[]): void;
614-
info(...objects: any[]): void;
615-
warn(...objects: any[]): void;
616-
error(...objects: any[]): void;
611+
interface Console {
612+
assert(condition?: boolean, ...data: any[]): void;
613+
clear(): void;
614+
count(label?: string): void;
615+
countReset(label?: string): void;
616+
debug(...data: any[]): void;
617+
dir(item?: any, options?: any): void;
618+
dirxml(...data: any[]): void;
619+
error(...data: any[]): void;
620+
group(...data: any[]): void;
621+
groupCollapsed(...data: any[]): void;
622+
groupEnd(): void;
623+
info(...data: any[]): void;
624+
log(...data: any[]): void;
625+
table(tabularData?: any, properties?: string[]): void;
626+
time(label?: string): void;
627+
timeEnd(label?: string): void;
628+
timeLog(label?: string, ...data: any[]): void;
629+
trace(...data: any[]): void;
630+
warn(...data: any[]): void;
617631
}
618632

619633
/**
@@ -625,7 +639,7 @@ declare var console: Console;
625639
/**
626640
* An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All
627641
* instances of `TextEncoder` only support UTF-8 encoding.
628-
*
642+
*
629643
* TextEncoder takes a stream of code points as input and emits a stream of UTF-8 bytes.
630644
*
631645
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder | TextEncoder on MDN}

0 commit comments

Comments
 (0)