const typeCache = { } ; export function type < T > ( label ) { if ( typeCache [ < string > label ] ) { throw new Error ( `Action type "${ label }" is not unique"` ) ; } typeCache [ < string > label ] = true ; return < T > label ; }