import { Instruction } from '../instruction' ; import { annotate } from '../../utils' ; export function CanActivate ( hook ) { return ( target ) => { annotate ( target , 'router.canActivate' , hook ) ; } ; } export interface CanActivate { routerCanActivate ( next , prev ) : Promise < boolean > | boolean ; }