Transformation that optimizes rules
new
RuleOptimizerTransformation(logger?: ILogger,options?: RuleOptimizerOptions,)
Creates a new RuleOptimizerTransformation
readonly
name: string
Human-readable name of the transformation
readonly
type: TransformationType
The transformation type identifier
private
readonly
options: Required<RuleOptimizerOptions>
private
stats: OptimizationStats
executeSync(rules: readonly string[],_context?: ITransformationContext,): readonly string[]
Optimizes rules for better performance and smaller file size
Gets optimization statistics
private
mergeSimilarRules(rules: string[]): string[]
Merges similar rules where possible
private
optimizePatterns(rules: string[]): string[]
Optimizes rule patterns for better matching performance
private
removeRedundantRules(rules: string[]): string[]
Removes rules that are subsumed by more general rules
private
simplifyModifiers(rules: string[]): string[]
Simplifies modifier lists