From 05d01d42ea5fe9dbca5e0242169bd7bb2a259777 Mon Sep 17 00:00:00 2001 From: RyotaMurohoshi Date: Fri, 18 Jan 2019 02:57:33 +0900 Subject: [PATCH] [js-yaml]: Added new noArrayIndent property that is added on v3.12.1 related : https://github.com/nodeca/js-yaml/pull/461 --- types/js-yaml/index.d.ts | 4 +++- types/js-yaml/js-yaml-tests.ts | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/types/js-yaml/index.d.ts b/types/js-yaml/index.d.ts index 49ba2807a7..b59741e74e 100644 --- a/types/js-yaml/index.d.ts +++ b/types/js-yaml/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for js-yaml 3.11 +// Type definitions for js-yaml 3.12 // Project: https://github.com/nodeca/js-yaml // Definitions by: Bart van der Schoor , Sebastian Clausen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -52,6 +52,8 @@ export interface LoadOptions { export interface DumpOptions { /** indentation width to use (in spaces). */ indent?: number; + /** when true, will not add an indentation level to array elements */ + noArrayIndent?: boolean; /** do not throw on invalid types (like function in the safe schema) and skip pairs and single values with such types. */ skipInvalid?: boolean; /** specifies level of nesting, when to switch from block to flow style for collections. -1 means block style everwhere */ diff --git a/types/js-yaml/js-yaml-tests.ts b/types/js-yaml/js-yaml-tests.ts index d3d90131d1..304da7731d 100644 --- a/types/js-yaml/js-yaml-tests.ts +++ b/types/js-yaml/js-yaml-tests.ts @@ -72,6 +72,9 @@ loadOpts = { dumpOpts = { indent: num }; +dumpOpts = { + noArrayIndent: bool +}; dumpOpts = { skipInvalid: bool };