mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 06:19:58 +08:00
Merge pull request #18978 from aeisenberg/master
Updates type definitions for js-yaml
This commit is contained in:
5
types/js-yaml/index.d.ts
vendored
5
types/js-yaml/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for js-yaml 3.9.0
|
||||
// Type definitions for js-yaml 3.9.1
|
||||
// Project: https://github.com/nodeca/js-yaml
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Sebastian Clausen <https://github.com/sclausen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -14,7 +14,8 @@ declare namespace jsyaml {
|
||||
}
|
||||
export class Schema {
|
||||
constructor(definition: SchemaDefinition);
|
||||
public static create(args: any[]): Schema;
|
||||
public static create(types: Type[] | Type): Schema;
|
||||
public static create(schemas: Schema[] | Schema, types: Type[] | Type): Schema;
|
||||
}
|
||||
|
||||
export function safeLoadAll(str: string, iterator: (doc: any) => void, opts?: LoadOptions): any;
|
||||
|
||||
@@ -106,4 +106,10 @@ value = yaml.dump(str, dumpOpts);
|
||||
|
||||
value = new yaml.YAMLException();
|
||||
value = new yaml.Type(str, typeConstructorOptions);
|
||||
value = yaml.Schema.create([schemaDefinition]);
|
||||
value = new yaml.Schema(schemaDefinition);
|
||||
value = yaml.Schema.create([new yaml.Type(str)]);
|
||||
value = yaml.Schema.create(new yaml.Type(str));
|
||||
value = yaml.Schema.create(new yaml.Schema(schemaDefinition), [new yaml.Type(str)]);
|
||||
value = yaml.Schema.create([new yaml.Schema(schemaDefinition)], [new yaml.Type(str)]);
|
||||
value = yaml.Schema.create(new yaml.Schema(schemaDefinition), new yaml.Type(str));
|
||||
value = yaml.Schema.create([new yaml.Schema(schemaDefinition)], new yaml.Type(str));
|
||||
|
||||
Reference in New Issue
Block a user