/
githubmirror
/
nest
Обзор
Документация
Войти
/
githubmirror
/
nest
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/common/interfaces/features/can-activate.interface.ts
25 строк
809 B
John Biundo
feat(common): Add documentation for public API
26 авг 2019, 23:18
Не верифицирован
26 авг 2019, 23:18
10c9d66
Код
Авторство
О чём код?
import { Observable } from 'rxjs'; import { ExecutionContext } from './execution-context.interface'; /** * Interface defining the `canActivate()` function that must be implemented * by a guard. Return value indicates whether or not the current request is * allowed to proceed. Return can be either synchronous (`boolean`) * or asynchronous (`Promise` or `Observable`). * * @see [Guards](https://docs.nestjs.com/guards) * * @publicApi */ export interface CanActivate { /** * @param context Current execution context. Provides access to details about * the current request pipeline. * * @returns Value indicating whether or not the current request is allowed to * proceed. */ canActivate( context: ExecutionContext, ): boolean | Promise<boolean> | Observable<boolean>; }