diff --git a/os-locale/os-locale-tests.ts b/os-locale/os-locale-tests.ts new file mode 100644 index 000000000..65763a112 --- /dev/null +++ b/os-locale/os-locale-tests.ts @@ -0,0 +1,8 @@ +/// + +import osLocale, { sync } from 'os-locale'; + +osLocale((err: any, locale: string) => { +}); + +var locale: string = sync(); diff --git a/os-locale/os-locale.d.ts b/os-locale/os-locale.d.ts new file mode 100644 index 000000000..17933ae67 --- /dev/null +++ b/os-locale/os-locale.d.ts @@ -0,0 +1,12 @@ +// Type definitions for os-locale 1.2.1 +// Project: https://github.com/sindresorhus/os-locale +// Definitions by: Aya Morisawa +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "os-locale" { + function osLocale(cb: (err: any, locale: string) => void): void; + function osLocaleSync(): string; + + export { osLocaleSync as sync }; + export default osLocale; +}