UNPKG

778 BTypeScriptView Raw
1import { IRuleMetadata, RuleFailure } from 'tslint/lib';
2import { AbstractRule } from 'tslint/lib/rules';
3import { SourceFile } from 'typescript';
4import { AngularClassDecoratorKeys, AngularLifecycleMethodKeys } from './util/utils';
5interface FailureParameters {
6 readonly className: string;
7 readonly decoratorName: AngularClassDecoratorKeys;
8 readonly methodName: AngularLifecycleMethodKeys;
9}
10export declare const getFailureMessage: (failureParameters: FailureParameters) => string;
11export declare class Rule extends AbstractRule {
12 static readonly metadata: IRuleMetadata;
13 static readonly FAILURE_STRING = "The method \"%s\" is not allowed for class \"%s\" because it is decorated with \"%s\"";
14 apply(sourceFile: SourceFile): RuleFailure[];
15}
16export {};