-
-
Save reime005/1f5d86e773e72e91345a9ee5ddbe953d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// config.ts | |
import Config from 'react-native-config'; | |
export interface Store { | |
config: Config; | |
} | |
type EnvKeys = 'SOME_API_KEY'; | |
interface Config { | |
testValue: number; | |
env: { | |
[key in EnvKeys]: string; | |
}; | |
} | |
const initialStore: Store = { | |
config: { | |
testValue: 42, | |
env: { | |
SOME_API_KEY: Config.SOME_API_KEY, | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment