From dfa80c44edbed7e944f031e7cc9b6b465e923460 Mon Sep 17 00:00:00 2001 From: segayuu Date: Tue, 14 Nov 2017 11:16:05 +0900 Subject: [PATCH] Only one of 'sequence', 'scalar' and 'mapping' can be used for kind. --- types/js-yaml/index.d.ts | 4 ++-- types/js-yaml/js-yaml-tests.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/js-yaml/index.d.ts b/types/js-yaml/index.d.ts index 51f3ae95cf..d01f272661 100644 --- a/types/js-yaml/index.d.ts +++ b/types/js-yaml/index.d.ts @@ -9,7 +9,7 @@ export function load(str: string, opts?: LoadOptions): any; export class Type implements TypeConstructorOptions { constructor(tag: string, opts?: TypeConstructorOptions); - kind: string | null; + kind: 'sequence' | 'scalar' | 'mapping' | null; resolve(data: any): boolean; construct(data: any): any; instanceOf: object | null; @@ -66,7 +66,7 @@ export interface DumpOptions { } export interface TypeConstructorOptions { - kind?: string; + kind?: 'sequence' | 'scalar' | 'mapping'; resolve?: (data: any) => boolean; construct?: (data: any) => any; instanceOf?: object; diff --git a/types/js-yaml/js-yaml-tests.ts b/types/js-yaml/js-yaml-tests.ts index 6799deafd8..f6d1da58f0 100644 --- a/types/js-yaml/js-yaml-tests.ts +++ b/types/js-yaml/js-yaml-tests.ts @@ -20,7 +20,7 @@ let schemaDefinition: SchemaDefinition = { include: array }; let typeConstructorOptions: TypeConstructorOptions = { - kind: str, + kind: "scalar", resolve: fn, construct: fn, instanceOf: obj,