作者:zodiac-tea
项目:zodiac-u
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?`,
)
}
}),
作者:Cammisul
项目:angula
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];
}
作者:AnthonyPAlice
项目:angula
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];
}