Update safeLoad type for js-yaml (#45390)

Co-authored-by: Ryan Frazier <rfrazier@sdl.usu.edu>
This commit is contained in:
Ryan Frazier 2020-06-24 20:22:05 -06:00 committed by GitHub
parent a116a8d77d
commit 14f1fea4b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
export as namespace jsyaml;
export function safeLoad(str: string, opts?: LoadOptions): any;
export function safeLoad(str: string, opts?: LoadOptions): string | object | undefined;
export function load(str: string, opts?: LoadOptions): any;
export class Type {

View File

@ -125,9 +125,9 @@ type.styleAliases;
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
// $ExpectType any
// $ExpectType string | object | undefined
yaml.safeLoad(str);
// $ExpectType any
// $ExpectType string | object | undefined
yaml.safeLoad(str, loadOpts);
// $ExpectType any