import { CompleterModel, CompletionHandler } from '@jupyterlab/completer'; import { LazyCompletionItem } from './item'; interface ICompletionMatch { /** * A score which indicates the strength of the match. * * A lower score is better. Zero is the best possible score. */ score: number; item: T; } /** * This will be contributed upstream */ export declare class GenericCompleterModel extends CompleterModel { settings: GenericCompleterModel.IOptions; constructor(settings?: GenericCompleterModel.IOptions); completionItems(): T[]; setCompletionItems(newValue: T[]): void; private _markFragment; protected getFilterText(item: T): string; protected getHighlightableLabelRegion(item: T): string; private _sortAndFilter; protected compareMatches(a: ICompletionMatch, b: ICompletionMatch): number; } export declare namespace GenericCompleterModel { interface IOptions { /** * Whether matching should be case-sensitive (default = true) */ caseSensitive?: boolean; /** * Whether perfect matches should be included (default = true) */ includePerfectMatches?: boolean; /** * Wheteher matches should be pre-filtered (default = true) */ preFilterMatches?: boolean; } const defaultOptions: IOptions; } export declare class LSPCompleterModel extends GenericCompleterModel { protected getFilterText(item: LazyCompletionItem): string; protected compareMatches(a: ICompletionMatch, b: ICompletionMatch): number; } export {};