From 4e412e57ededaa6382b402208ebcddf9a0b8a771 Mon Sep 17 00:00:00 2001 From: Edward Sammut Alessi Date: Wed, 16 May 2018 11:09:29 +0200 Subject: [PATCH] Typings for intl-locales-supported --- types/intl-locales-supported/index.d.ts | 6 +++++ .../intl-locales-supported-tests.ts | 4 ++++ types/intl-locales-supported/tsconfig.json | 23 +++++++++++++++++++ types/intl-locales-supported/tslint.json | 1 + 4 files changed, 34 insertions(+) create mode 100644 types/intl-locales-supported/index.d.ts create mode 100644 types/intl-locales-supported/intl-locales-supported-tests.ts create mode 100644 types/intl-locales-supported/tsconfig.json create mode 100644 types/intl-locales-supported/tslint.json diff --git a/types/intl-locales-supported/index.d.ts b/types/intl-locales-supported/index.d.ts new file mode 100644 index 0000000000..1ad51f1f6c --- /dev/null +++ b/types/intl-locales-supported/index.d.ts @@ -0,0 +1,6 @@ +// Type definitions for intl-locales-supported 1.0 +// Project: https://github.com/yahoo/intl-locales-supported +// Definitions by: My Self +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export default function areIntlLocalesSupported(locales: string | string[]): void; diff --git a/types/intl-locales-supported/intl-locales-supported-tests.ts b/types/intl-locales-supported/intl-locales-supported-tests.ts new file mode 100644 index 0000000000..dcddcd545d --- /dev/null +++ b/types/intl-locales-supported/intl-locales-supported-tests.ts @@ -0,0 +1,4 @@ +import areIntlLocalesSupported from "intl-locales-supported"; + +areIntlLocalesSupported("en-GB"); +areIntlLocalesSupported([ "en-GB", "en-US" ]); diff --git a/types/intl-locales-supported/tsconfig.json b/types/intl-locales-supported/tsconfig.json new file mode 100644 index 0000000000..f528331ae4 --- /dev/null +++ b/types/intl-locales-supported/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "intl-locales-supported-tests.ts" + ] +} diff --git a/types/intl-locales-supported/tslint.json b/types/intl-locales-supported/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/intl-locales-supported/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }