Pilates
    Preparing search index...

    Function didYouMean

    • Suggest the closest match from candidates to input, or undefined if none is close enough. Heuristic ported from TypeScript's getSpellingSuggestionForName (src/compiler/checker.ts):

      • n < 3: only a case-insensitive exact match counts
      • maxLenDiff: min(2, floor(0.34 * n)) reject candidates too far in length
      • maxDist: floor(0.4 * n) + 1 max edit distance accepted

      Comparison is case-insensitive.

      Parameters

      • input: string
      • candidates: readonly string[]

      Returns string | undefined