SPELLCHECK.d.ts 702 B

123456789101112131415161718192021222324
  1. interface SpellCheckTerms {
  2. mode: 'INCLUDE' | 'EXCLUDE';
  3. dictionary: string;
  4. }
  5. interface SpellCheckOptions {
  6. DISTANCE?: number;
  7. TERMS?: SpellCheckTerms | Array<SpellCheckTerms>;
  8. DIALECT?: number;
  9. }
  10. export declare function transformArguments(index: string, query: string, options?: SpellCheckOptions): Array<string>;
  11. type SpellCheckRawReply = Array<[
  12. _: string,
  13. term: string,
  14. suggestions: Array<[score: string, suggestion: string]>
  15. ]>;
  16. type SpellCheckReply = Array<{
  17. term: string;
  18. suggestions: Array<{
  19. score: number;
  20. suggestion: string;
  21. }>;
  22. }>;
  23. export declare function transformReply(rawReply: SpellCheckRawReply): SpellCheckReply;
  24. export {};