Beispiel #1
0
 filter(action => {
     if (actionType.hasOwnProperty("type")) {
         return action.type === (actionType as any).type
     } else {
         throw new Error(
             `Action missing static property "type". Did you forget the @OfType() decorator?`,
         )
     }
 }),
Beispiel #2
0
export function getTypeName(type: Type<any>): string {
  // Return the name of the type or the first line of its stringified version.
  return (type as any).overriddenName || type.name || type.toString().split('\n')[0];
}
Beispiel #3
0
export function getComponentName(component: Type<any>): string {
  // Return the name of the component or the first line of its stringified version.
  return (component as any).overriddenName || component.name || component.toString().split('\n')[0];
}