ramda#defaultTo TypeScript Examples

The following examples show how to use ramda#defaultTo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: rootReducer.ts    From nosgestesclimat-site with MIT License 6 votes vote down vote up
mainReducer = (state: any, action: Action) =>
	combineReducers({
		explainedVariable,
		// We need to access the `rules` in the simulation reducer
		simulation: (a: Simulation | null = null, b: Action): Simulation | null =>
			simulation(a, b),
		previousSimulation: defaultTo(null) as Reducer<SavedSimulation | null>,
		situationBranch,
		rules,
		actionChoices,
		conference,
		survey,
		iframeOptions: defaultTo(null),
		tutorials,
		storedTrajets,
		thenRedirectTo,
		tracking,
	})(state, action)