diff --git a/types/react-native-dotenv/index.d.ts b/types/react-native-dotenv/index.d.ts index 9066cfc0aa..7c56c10553 100644 --- a/types/react-native-dotenv/index.d.ts +++ b/types/react-native-dotenv/index.d.ts @@ -9,5 +9,4 @@ interface Env { } declare const env: Env; - -export { env }; +export = env; diff --git a/types/react-native-dotenv/react-native-dotenv-tests.ts b/types/react-native-dotenv/react-native-dotenv-tests.ts index 1bb0e930e6..ad17edf36b 100644 --- a/types/react-native-dotenv/react-native-dotenv-tests.ts +++ b/types/react-native-dotenv/react-native-dotenv-tests.ts @@ -1,3 +1,3 @@ -import { env } from "react-native-dotenv"; +import env from "react-native-dotenv"; env.API_KEY; diff --git a/types/react-native-dotenv/tsconfig.json b/types/react-native-dotenv/tsconfig.json index 9f81e8b6a1..23b7cfb9ed 100644 --- a/types/react-native-dotenv/tsconfig.json +++ b/types/react-native-dotenv/tsconfig.json @@ -1,23 +1,17 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es6" - ], + "lib": ["es6"], + "esModuleInterop": true, "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": [ - "../" - ], + "typeRoots": ["../"], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true }, - "files": [ - "index.d.ts", - "react-native-dotenv-tests.ts" - ] + "files": ["index.d.ts", "react-native-dotenv-tests.ts"] }