import { Effects } from './types' ; export interface StateWithFx < S > { state : S ; effects : Effects ; } export class StateWithFx < S > { constructor ( state , effects ) { this . state = state ; this . effects = effects ; } } export function hasFX < S > ( s ) { return s instanceof StateWithFx ; } export function fx < S > ( state , effects ) { return new StateWithFx ( state , effects ) ; }