Skip to content

Instantly share code, notes, and snippets.

@reime005
Created January 23, 2021 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reime005/1f5d86e773e72e91345a9ee5ddbe953d to your computer and use it in GitHub Desktop.
Save reime005/1f5d86e773e72e91345a9ee5ddbe953d to your computer and use it in GitHub Desktop.
// 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