diff --git a/src/language/rule/abstractRule.ts b/src/language/rule/abstractRule.ts index a31168c1d81..09e821ed46f 100644 --- a/src/language/rule/abstractRule.ts +++ b/src/language/rule/abstractRule.ts @@ -49,8 +49,16 @@ export abstract class AbstractRule implements IRule { } protected applyWithFunction(sourceFile: ts.SourceFile, walkFn: (ctx: WalkContext) => void): RuleFailure[]; - protected applyWithFunction(sourceFile: ts.SourceFile, walkFn: (ctx: WalkContext) => void, options: T): RuleFailure[]; - protected applyWithFunction(sourceFile: ts.SourceFile, walkFn: (ctx: WalkContext) => void, options?: T): RuleFailure[] { + protected applyWithFunction( + sourceFile: ts.SourceFile, + walkFn: (ctx: WalkContext) => void, + options: U, + ): RuleFailure[]; + protected applyWithFunction( + sourceFile: ts.SourceFile, + walkFn: (ctx: WalkContext) => void, + options?: U, + ): RuleFailure[] { const ctx = new WalkContext(sourceFile, this.ruleName, options); walkFn(ctx); return this.filterFailures(ctx.failures);