license const getPrototypeOf = Object . getPrototypeOf || function ( obj ) : any { return obj . __proto__ ; } ; export interface UnnamedCase { [ key ] : any ; only ? : boolean ; skip ? : boolean ; } export interface NamedCase extends UnnamedCase { name : string ; } export function _cases < T extends UnnamedCase > ( adapter , cases ) ; export function _cases < T extends NamedCase > ( adapter , cases ) ; export function _cases ( adapter , cases ) { if ( getPrototypeOf ( cases ) !== Array . prototype ) { cases = Object . keys ( cases ) . map ( ( key ) => ( { ... cases [ key ] , name : key } ) ) ; } cases . forEach ( adapter ) ; }