Skip to content

Commit 6cafae8

Browse files
authored
console: more improvements & bugfixes
* console bugfix: Symbol keys were not printed * export inspect and format to public API
1 parent f17dbf0 commit 6cafae8

File tree

5 files changed

+78749
-78677
lines changed

5 files changed

+78749
-78677
lines changed

docs/types/txikijs.d.ts

+19
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,25 @@ declare global {
10581058
/** format js values to be well readable */
10591059
inspect?: (args: any[]) => string,
10601060
}): typeof console;
1061+
1062+
/**
1063+
* format any js value to be well readable
1064+
* @returns resulting string
1065+
*/
1066+
function inspect(value: any, options?: { depth?: number, colors?: boolean, showHidden?: boolean }): string;
1067+
1068+
/**
1069+
* print format string and insert given values, see https://console.spec.whatwg.org/#formatter
1070+
* leftover values are appended to the end
1071+
* @returns resulting string
1072+
*/
1073+
function format(format: string, ...args: any[]): string;
1074+
1075+
/**
1076+
* format given values to a well readable string
1077+
* @returns resulting string
1078+
*/
1079+
function format(...values: any[]): string;
10611080
}
10621081

10631082
export {};

0 commit comments

Comments
 (0)