File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 1+ import { Flow } from "../models/Flow" ;
2+ import { RuleResult } from "../models/RuleResult" ;
3+
4+ export interface IRuleDefinition {
5+ autoFixable : boolean ;
6+ description : string ;
7+ docRefs : Array < { label : string ; path : string } > ;
8+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
9+ execute ( flow : Flow , ruleOptions ?: { } ) : RuleResult ;
10+ isConfigurable : boolean ;
11+ label : string ;
12+ name : string ;
13+ severity ?: string ;
14+ supportedTypes : string [ ] ;
15+
16+ uri ?: string ;
17+ }
Original file line number Diff line number Diff line change 1- import { IRuleDefinition } from "../interfaces/IRuleDefinition" ;
21import { AdvancedRule } from "../models/AdvancedRule" ;
32import { BetaRuleStore , DefaultRuleStore } from "../store/DefaultRuleStore" ;
43
5- export class DynamicRule < T extends AdvancedRule | IRuleDefinition > {
4+ export class DynamicRule < T extends AdvancedRule > {
65 constructor ( className : string ) {
76 if ( ! DefaultRuleStore . hasOwnProperty ( className ) && BetaRuleStore . hasOwnProperty ( className ) ) {
87 return new BetaRuleStore [ className ] ( ) as T ;
You can’t perform that action at this time.
0 commit comments