Only one of 'sequence', 'scalar' and 'mapping' can be used for kind.

This commit is contained in:
segayuu
2017-11-14 11:16:05 +09:00
parent a70ad3ce5d
commit dfa80c44ed
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -20,7 +20,7 @@ let schemaDefinition: SchemaDefinition = {
include: array
};
let typeConstructorOptions: TypeConstructorOptions = {
kind: str,
kind: "scalar",
resolve: fn,
construct: fn,
instanceOf: obj,