TypeScript @angular-core.Type类(方法)实例源码

下面列出了TypeScript @angular-core.Type 类(方法)源码代码实例,从而了解它的用法。

作者: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];
}


问题


面经


文章

微信
公众号

扫码关注公众号