mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
got tests running, fix up types
This commit is contained in:
8
types/js-yaml/index.d.ts
vendored
8
types/js-yaml/index.d.ts
vendored
@@ -28,8 +28,12 @@ export class Schema implements SchemaDefinition {
|
||||
static create(schemas: Schema[] | Schema, types: Type[] | Type): Schema;
|
||||
}
|
||||
|
||||
export function safeLoadAll(str: string, iterator?: (doc: any) => void, opts?: LoadOptions): DocumentLoadResult[] | undefined;
|
||||
export function loadAll(str: string, iterator?: (doc: any) => void, opts?: LoadOptions): DocumentLoadResult[] | undefined;
|
||||
export function safeLoadAll(str: string, iterator?: undefined, opts?: LoadOptions): DocumentLoadResult[];
|
||||
export function safeLoadAll(str: string, iterator: (doc: any) => void, opts?: LoadOptions): undefined;
|
||||
|
||||
export function loadAll(str: string, iterator?: undefined, opts?: LoadOptions): DocumentLoadResult[];
|
||||
|
||||
export function loadAll(str: string, iterator: (doc: any) => void, opts?: LoadOptions): undefined;
|
||||
|
||||
export function safeDump(obj: any, opts?: DumpOptions): string;
|
||||
export function dump(obj: any, opts?: DumpOptions): string;
|
||||
|
||||
@@ -109,40 +109,44 @@ type.styleAliases;
|
||||
|
||||
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
|
||||
// $ExpectType any
|
||||
// $ExpectType DocumentLoadResult
|
||||
yaml.safeLoad(str);
|
||||
// $ExpectType any
|
||||
// $ExpectType DocumentLoadResult
|
||||
yaml.safeLoad(str, loadOpts);
|
||||
|
||||
// $ExpectType any
|
||||
// $ExpectType DocumentLoadResult
|
||||
yaml.load(str);
|
||||
// $ExpectType any
|
||||
// $ExpectType DocumentLoadResult
|
||||
yaml.load(str, loadOpts);
|
||||
|
||||
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
|
||||
// $ExpectType any
|
||||
// $ExpectType DocumentLoadResult[]
|
||||
yaml.safeLoadAll(str);
|
||||
// $ExpectType any
|
||||
|
||||
// $ExpectType undefined
|
||||
yaml.safeLoadAll(str, (doc) => {
|
||||
value = doc;
|
||||
});
|
||||
// $ExpectType any
|
||||
// $ExpectType undefined
|
||||
yaml.safeLoadAll(str, (doc) => {
|
||||
value = doc;
|
||||
}, loadOpts);
|
||||
// $ExpectType DocumentLoadResult[]
|
||||
value = yaml.safeLoadAll(str, undefined, loadOpts);
|
||||
|
||||
// $ExpectType any
|
||||
// $ExpectType DocumentLoadResult[]
|
||||
value = yaml.loadAll(str);
|
||||
// $ExpectType any
|
||||
|
||||
// $ExpectType undefined
|
||||
yaml.loadAll(str, (doc) => {
|
||||
value = doc;
|
||||
});
|
||||
// $ExpectType any
|
||||
// $ExpectType undefined
|
||||
yaml.loadAll(str, (doc) => {
|
||||
value = doc;
|
||||
}, loadOpts);
|
||||
// $ExpectType DocumentLoadResult[]
|
||||
value = yaml.loadAll(str, undefined, loadOpts);
|
||||
|
||||
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
|
||||
Reference in New Issue
Block a user