import type { IAction } from './IAction' ; import type { IActionInfo } from './IActionInfo' ; const actionSymbol = Symbol ( '@action' ) ; export function createAction ( id , info ) { const action = { id : `@action/${ id }` , info , } ; ( action as any ) [ actionSymbol ] = true ; return action ; } export function isAction ( obj ) { return ( obj && typeof obj === 'object' && actionSymbol in obj ) ; }