Merge pull request #26672 from maplerichie/ex-react-native-i18n

Added type definitions for ex-react-native-i18n
This commit is contained in:
Nathan Shively-Sanders
2018-06-19 12:49:02 -07:00
committed by GitHub
4 changed files with 43 additions and 0 deletions
@@ -0,0 +1,8 @@
import I18n from 'ex-react-native-i18n';
I18n.defaultLocale = 'en';
I18n.fallbacks = true;
I18n.translations = {};
I18n.locale = 'zh';
const deviceLocale: string = I18n.locale;
+11
View File
@@ -0,0 +1,11 @@
// Type definitions for ex-react-native-i18n 0.0
// Project: https://github.com/xcarpentier/ex-react-native-i18n/
// Definitions by: LikKee Richie <https://github.com/maplerichie>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
// Actual version for ex-react-native-i18n is 0.0.4 but 'npm run lint' doesn't allow patch version to pass
import I18n = require("i18n-js");
// import I18n from 'ex-react-native-i18n';
export default I18n;
+23
View File
@@ -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",
"ex-react-native-i18n-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }