Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MLRule<T, O>

Type parameters

  • T: RuleConfigValue

  • O

Hierarchy

  • MLRule

Index

Constructors

Private constructor

  • Parameters

    Returns MLRule

Properties

Private #f

#f: MLRuleOptions<T, O>["fix"]

Private #v

#v: MLRuleOptions<T, O>["verify"]

Readonly defaultOptions

defaultOptions: O

Readonly defaultServerity

defaultServerity: Severity

Readonly defaultValue

defaultValue: T

Readonly name

name: string

Methods

fix

  • fix(document: Document<T, O>, rule: RuleInfo<T, O>): Promise<void>
  • Parameters

    • document: Document<T, O>
    • rule: RuleInfo<T, O>

    Returns Promise<void>

optimizeOption

  • optimizeOption(configSettings: T | RuleConfig<T, O>): RuleInfo<T, O>
  • Parameters

    • configSettings: T | RuleConfig<T, O>

    Returns RuleInfo<T, O>

verify

  • verify(document: Document<T, O>, i18n: I18n, rule: RuleInfo<T, O>): Promise<VerifiedResult[]>
  • Parameters

    • document: Document<T, O>
    • i18n: I18n
    • rule: RuleInfo<T, O>

    Returns Promise<VerifiedResult[]>

Static create

  • Type parameters

    • T: RuleConfigValue

    • O

    Parameters

    Returns MLRule<T, O>

Generated using TypeDoc