0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-29 08:58:01 -04:00

std(yaml): correct sortKeys type (#3708)

This commit is contained in:
Brandon Kalinowski 2020-01-18 06:19:36 -08:00 committed by Ry Dahl
parent b2f01dcb50
commit 4f1fa82d1d

View file

@ -62,10 +62,13 @@ export interface DumperStateOptions {
/** specifies a schema to use. */
schema?: SchemaDefinition;
/**
* if true, sort keys when dumping YAML.
* If true, sort keys when dumping YAML in ascending, ASCII character order.
* If a function, use the function to sort the keys. (default: false)
* If a function is specified, the function must return a negative value
* if first argument is less than second argument, zero if they're equal
* and a positive value otherwise.
*/
sortKeys?: boolean | ((a: Any, b: Any) => number);
sortKeys?: boolean | ((a: string, b: string) => number);
/** set max line width. (default: 80) */
lineWidth?: number;
/**