@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
37 lines (36 loc) • 1.5 kB
TypeScript
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';
import { BaseGuardData } from './guard-data';
import * as i0 from "@angular/core";
export interface ExperimentGuardData extends BaseGuardData {
experiments: string | string[];
shellExperiments?: string | string[];
}
/**
*
* @smeDoc {@label Experiments and IsProduction @id sme-dev-guide-utilities-msft-sme-experiments}
*
* @overview
* @file {@filepath ./experiment-key/examples/overview.md}
*
* @example {@label Experiment key @id experiment-key}
* @file {@filename experiment-key.ts @filepath ./experiment-key/examples/experiment-key.ts}
*
* @example {@label IsProduction @id isProduction}
* @file {@filename isproduction.ts @filepath ./experiment-key/examples/isproduction.ts}
*/
export declare class ExperimentGuardService implements CanActivate {
private router;
/**
* Initializes a new instance of the ExperimentGuardService class.
* @param router the router.
*/
constructor(router: Router);
/**
* Guard against navigating unless angular dev mode is enabled
* @param route the current route snapshot
* @param state the current router state snapshot
*/
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<ExperimentGuardService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ExperimentGuardService>;
}