// The `fileSearchProvider` and `textSearchProvider` proposed APIs as shipped in VS Code 1.91 (vscode-web 1.91.1). // Enabled for this extension by `enabledApiProposals` in its manifest and the workbench's product configuration. import "vscode"; declare module "vscode" { export interface SearchOptions { folder: Uri; includes: string[]; excludes: string[]; useIgnoreFiles: boolean; followSymlinks: boolean; useGlobalIgnoreFiles: boolean; useParentIgnoreFiles: boolean; } export interface FileSearchQuery { pattern: string; } export interface FileSearchOptions extends SearchOptions { maxResults?: number; } export interface FileSearchProvider { provideFileSearchResults( query: FileSearchQuery, options: FileSearchOptions, token: CancellationToken, ): ProviderResult; } export interface TextSearchQuery { pattern: string; isMultiline?: boolean; isRegExp?: boolean; isCaseSensitive?: boolean; isWordMatch?: boolean; } export interface TextSearchOptions extends SearchOptions { maxResults: number; maxFileSize?: number; } export interface TextSearchComplete { limitHit?: boolean; } export interface TextSearchMatchPreview { text: string; matches: Range[]; } export interface TextSearchMatch { uri: Uri; ranges: Range[]; preview: TextSearchMatchPreview; } export type TextSearchResult = TextSearchMatch; export interface TextSearchProvider { provideTextSearchResults( query: TextSearchQuery, options: TextSearchOptions, progress: Progress, token: CancellationToken, ): ProviderResult; } export namespace workspace { export function registerFileSearchProvider(scheme: string, provider: FileSearchProvider): Disposable; export function registerTextSearchProvider(scheme: string, provider: TextSearchProvider): Disposable; } }