Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Config declare module for react-native-config?

$
0
0

I have an old project config environment by react-native-dotenv just like beblow

declare module 'react-native-dotenv' {  export const APP_ROOT_API: string;  export const APP_PUBLIC_AVATAR_PATH: string;  export const APP_ABOUT_URL: string;  export const APP_ONESIGNAL_APP_ID: string;  export const APP_ONESIGNAL_PREFIX: string;  export const APP_TEST_USER_ID: string;  export const APP_TEST_TOKEN: string;  export const APP_TEST_REFRESH_TOKEN: string;  export const CLIENT_ID: string;  export const CLIENT_SECRET: string;  export const REDIRECT_URL: string;  export const AUTHORIZATION_ENDPOINT: string;  export const TOKEN_ENDPOINT: string;  export const SCOPES;  export const ENV;}

But now I want to change the config environment by using react-native-config

Could I just change code like this:

declare module 'react-native-config' {  export const APP_ROOT_API: string;  export const APP_PUBLIC_AVATAR_PATH: string;  export const APP_ABOUT_URL: string;  export const APP_ONESIGNAL_APP_ID: string;  export const APP_ONESIGNAL_PREFIX: string;  export const APP_TEST_USER_ID: string;  export const APP_TEST_TOKEN: string;  export const APP_TEST_REFRESH_TOKEN: string;  export const CLIENT_ID: string;  export const CLIENT_SECRET: string;  export const REDIRECT_URL: string;  export const AUTHORIZATION_ENDPOINT: string;  export const TOKEN_ENDPOINT: string;  export const SCOPES;  export const ENV;}

Viewing all articles
Browse latest Browse all 6287

Trending Articles