diff --git a/types/rtl-detect/index.d.ts b/types/rtl-detect/index.d.ts new file mode 100644 index 0000000000..9166325182 --- /dev/null +++ b/types/rtl-detect/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for rtl-detect 1.0 +// Project: https://github.com/shadiabuhilal/rtl-detect +// Definitions by: imprevo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function getLangDir(strLocale: string): 'ltr' | 'rtl'; +export function isRtlLang(strLocale: string): boolean | undefined; diff --git a/types/rtl-detect/rtl-detect-tests.ts b/types/rtl-detect/rtl-detect-tests.ts new file mode 100644 index 0000000000..81e08c226d --- /dev/null +++ b/types/rtl-detect/rtl-detect-tests.ts @@ -0,0 +1,4 @@ +import * as rtlDetect from 'rtl-detect'; + +rtlDetect.getLangDir(''); +rtlDetect.isRtlLang(''); diff --git a/types/rtl-detect/tsconfig.json b/types/rtl-detect/tsconfig.json new file mode 100644 index 0000000000..b0b27b65f9 --- /dev/null +++ b/types/rtl-detect/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "rtl-detect-tests.ts" + ] +} diff --git a/types/rtl-detect/tslint.json b/types/rtl-detect/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/rtl-detect/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }