Current section

Files

Jump to
spellweaver priv bun node_modules cspell-lib dist lib textValidation parsedText.d.ts
Raw

priv/bun/node_modules/cspell-lib/dist/lib/textValidation/parsedText.d.ts

import type { MappedText } from '@cspell/cspell-types';
import type { ValidationIssue } from '../Models/ValidationIssue.js';
import type * as TextRange from '../util/TextRange.js';
export type Offset = number;
export type SimpleRange = readonly [Offset, Offset];
export declare function mapIssueBackToOriginalPos(mappedText: MappedText, issue: ValidationIssue): ValidationIssue;
export declare function mapRangeBackToOriginalPos(offRange: SimpleRange, map: number[] | undefined): SimpleRange;
export declare function mapRangeToLocal(rangeOrig: SimpleRange, map: number[] | undefined): SimpleRange;
/**
* Factory to create a segmentation function that will segment MappedText against a set of includeRanges.
* The function produced is optimized for forward scanning. It will perform poorly for randomly ordered offsets.
* @param includeRanges Allowed ranges for words.
*/
export declare function createMappedTextSegmenter(includeRanges: TextRange.MatchRange[]): (text: MappedText) => Iterable<MappedText>;
//# sourceMappingURL=parsedText.d.ts.map