diff --git a/os-locale/os-locale-tests.ts b/os-locale/os-locale-tests.ts index 65763a112..bcf5b0129 100644 --- a/os-locale/os-locale-tests.ts +++ b/os-locale/os-locale-tests.ts @@ -5,4 +5,8 @@ import osLocale, { sync } from 'os-locale'; osLocale((err: any, locale: string) => { }); -var locale: string = sync(); +osLocale({spawn: false}, (err: any, locale: string) => { +}); + +var locale1: string = sync(); +var locale2: string = sync({spawn: false}); diff --git a/os-locale/os-locale.d.ts b/os-locale/os-locale.d.ts index 17933ae67..74b2d6922 100644 --- a/os-locale/os-locale.d.ts +++ b/os-locale/os-locale.d.ts @@ -1,12 +1,14 @@ -// Type definitions for os-locale 1.2.1 +// Type definitions for os-locale 1.4.0 // Project: https://github.com/sindresorhus/os-locale // Definitions by: Aya Morisawa // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module "os-locale" { + function osLocale(options: {spawn?: boolean}, cb: (err: any, locale: string) => void): void; function osLocale(cb: (err: any, locale: string) => void): void; function osLocaleSync(): string; - + function osLocaleSync(options: {spawn?: boolean}): string; + export { osLocaleSync as sync }; export default osLocale; }