import { Action } from './Action' ; import { ActionPayload } from './ActionPayload' ; export class InferableAction implements Action < any > { public readonly type : string ; public readonly payload : null | object ; public constructor ( type , payload ) { this . type = type ; this . payload = payload ; } public is < U extends keyof ActionPayload > ( type ) { return this . type === type ; } }