mirror of
https://github.com/denoland/deno.git
synced 2025-09-29 21:54:48 +00:00
feat(Deno.inspect): Add sorted, trailingComma, compact and iterableLimit to InspectOptions (#6591)
This commit is contained in:
parent
40d081d3d9
commit
5ec41cbcc2
10 changed files with 463 additions and 185 deletions
12
cli/js/lib.deno.ns.d.ts
vendored
12
cli/js/lib.deno.ns.d.ts
vendored
|
@ -2034,8 +2034,18 @@ declare namespace Deno {
|
|||
| PluginPermissionDescriptor
|
||||
| HrtimePermissionDescriptor;
|
||||
|
||||
interface InspectOptions {
|
||||
export interface InspectOptions {
|
||||
/** Traversal depth for nested objects. Defaults to 4. */
|
||||
depth?: number;
|
||||
/** Sort Object, Set and Map entries by key. Defaults to false. */
|
||||
sorted?: boolean;
|
||||
/** Add a trailing comma for multiline collections. Defaults to false. */
|
||||
trailingComma?: boolean;
|
||||
/** Try to fit more than one entry of a collection on the same line.
|
||||
* Defaults to true. */
|
||||
compact?: boolean;
|
||||
/** The maximum number of iterable entries to print. Defaults to 100. */
|
||||
iterableLimit?: number;
|
||||
}
|
||||
|
||||
/** Converts the input into a string that has the same format as printed by
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue