jsonContributions.d.ts 969 B

1234567891011121314151617
  1. import { Thenable, MarkedString, CompletionItem } from './jsonLanguageService';
  2. export interface JSONWorkerContribution {
  3. getInfoContribution(uri: string, location: JSONPath): Thenable<MarkedString[]>;
  4. collectPropertyCompletions(uri: string, location: JSONPath, currentWord: string, addValue: boolean, isLast: boolean, result: CompletionsCollector): Thenable<any>;
  5. collectValueCompletions(uri: string, location: JSONPath, propertyKey: string, result: CompletionsCollector): Thenable<any>;
  6. collectDefaultCompletions(uri: string, result: CompletionsCollector): Thenable<any>;
  7. resolveCompletion?(item: CompletionItem): Thenable<CompletionItem>;
  8. }
  9. export declare type Segment = string | number;
  10. export declare type JSONPath = Segment[];
  11. export interface CompletionsCollector {
  12. add(suggestion: CompletionItem): void;
  13. error(message: string): void;
  14. log(message: string): void;
  15. setAsIncomplete(): void;
  16. getNumberOfProposals(): number;
  17. }