UNPKG

angular2

Version:

Angular 2 - a web framework for modern web apps

8 lines (6 loc) 235 B
import {Type} from 'angular2/src/facade/lang'; export function hasLifecycleHook(name: string, obj: Object): boolean { let type = obj.constructor; if (!(type instanceof Type)) return false; return name in(<any>type).prototype; }