本文整理汇总了TypeScript中decentraland-commons.env.isDevelopment方法的典型用法代码示例。如果您正苦于以下问题:TypeScript env.isDevelopment方法的具体用法?TypeScript env.isDevelopment怎么用?TypeScript env.isDevelopment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类decentraland-commons.env
的用法示例。
在下文中一共展示了env.isDevelopment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
predicate: (_: any, action) =>
env.isDevelopment() || action.type.includes('Failure')
示例2: createAnalyticsMiddleware
collapsed: () => true,
predicate: (_: any, action) =>
env.isDevelopment() || action.type.includes('Failure')
})
const analyticsMiddleware = createAnalyticsMiddleware(
env.get('REACT_APP_SEGMENT_API_KEY')
)
const { storageMiddleware, loadStorageMiddleware } = createStorageMiddleware({
storageKey: env.get('REACT_APP_LOCAL_STORAGE_KEY', 'decentraland-agora')
})
const middleware = applyMiddleware(
historyMiddleware,
sagasMiddleware,
loggerMiddleware,
analyticsMiddleware,
storageMiddleware
)
const enhancer = composeEnhancers(middleware)
const store = createStore(rootReducer, enhancer)
sagasMiddleware.run(rootSaga)
loadStorageMiddleware(store)
if (env.isDevelopment()) {
const _window = window as any
_window.getState = store.getState
}
export { history, store }