diff --git a/types/js-yaml/index.d.ts b/types/js-yaml/index.d.ts index 83fbf83534..8dfd30dc4c 100644 --- a/types/js-yaml/index.d.ts +++ b/types/js-yaml/index.d.ts @@ -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 { diff --git a/types/js-yaml/js-yaml-tests.ts b/types/js-yaml/js-yaml-tests.ts index c40064ac1e..82582e2de9 100644 --- a/types/js-yaml/js-yaml-tests.ts +++ b/types/js-yaml/js-yaml-tests.ts @@ -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