From 9f7e4d2bb58393c8cc785ae6321a49f6ce2ed399 Mon Sep 17 00:00:00 2001 From: Haseeb Majid Date: Tue, 9 Apr 2019 21:05:02 +0100 Subject: [PATCH] Added dotenv --- types/react-native-dotenv/index.d.ts | 10 +++++++++ .../react-native-dotenv-tests.ts | 3 +++ types/react-native-dotenv/tsconfig.json | 22 +++++++++++++++++++ types/react-native-dotenv/tslint.json | 1 + 4 files changed, 36 insertions(+) create mode 100644 types/react-native-dotenv/index.d.ts create mode 100644 types/react-native-dotenv/react-native-dotenv-tests.ts create mode 100644 types/react-native-dotenv/tsconfig.json create mode 100644 types/react-native-dotenv/tslint.json diff --git a/types/react-native-dotenv/index.d.ts b/types/react-native-dotenv/index.d.ts new file mode 100644 index 0000000000..c2e215dd58 --- /dev/null +++ b/types/react-native-dotenv/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for react-native-dotenv 0.2 +// Project: https://github.com/zetachang/react-native-dotenv +// Definitions by: hmajid2301 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface Env { + [name: string]: string; +} + +export const env: Env; diff --git a/types/react-native-dotenv/react-native-dotenv-tests.ts b/types/react-native-dotenv/react-native-dotenv-tests.ts new file mode 100644 index 0000000000..213e1eaf63 --- /dev/null +++ b/types/react-native-dotenv/react-native-dotenv-tests.ts @@ -0,0 +1,3 @@ +import { env } from "react-native-dotenv"; + +env.CAT_API; diff --git a/types/react-native-dotenv/tsconfig.json b/types/react-native-dotenv/tsconfig.json new file mode 100644 index 0000000000..d0f5618e23 --- /dev/null +++ b/types/react-native-dotenv/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", + "react-native-dotenv-tests.ts" + ] +} diff --git a/types/react-native-dotenv/tslint.json b/types/react-native-dotenv/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-native-dotenv/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }