indexes.d.ts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * @param {number} pointer The |pointer| to search for.
  3. * @param {(!Array.<?number>|undefined)} index The |index| to search within.
  4. * @return {?number} The code point corresponding to |pointer| in |index|,
  5. * or null if |code point| is not in |index|.
  6. */
  7. export declare function indexCodePointFor(pointer: number, index: (Array<number | null> | undefined)): number | null;
  8. /**
  9. * @param {number} code_point The |code point| to search for.
  10. * @param {!Array.<?number>} index The |index| to search within.
  11. * @return {?number} The first pointer corresponding to |code point| in
  12. * |index|, or null if |code point| is not in |index|.
  13. */
  14. export declare function indexPointerFor(code_point: number, index: Array<number | null>): number | null;
  15. /**
  16. * @param {string} name Name of the index.
  17. * @return {(!Array.<number>|!Array.<Array.<number>>)}
  18. * */
  19. export declare function index(name: string): number[] | number[][];
  20. /**
  21. * @param {number} pointer The |pointer| to search for in the gb18030 index.
  22. * @return {?number} The code point corresponding to |pointer| in |index|,
  23. * or null if |code point| is not in the gb18030 index.
  24. */
  25. export declare function indexGB18030RangesCodePointFor(pointer: number): number | null;
  26. /**
  27. * @param {number} code_point The |code point| to locate in the gb18030 index.
  28. * @return {number} The first pointer corresponding to |code point| in the
  29. * gb18030 index.
  30. */
  31. export declare function indexGB18030RangesPointerFor(code_point: number): number;
  32. /**
  33. * @param {number} code_point The |code_point| to search for in the Shift_JIS
  34. * index.
  35. * @return {?number} The code point corresponding to |pointer| in |index|,
  36. * or null if |code point| is not in the Shift_JIS index.
  37. */
  38. export declare function indexShiftJISPointerFor(code_point: number): number | null;
  39. /**
  40. * @param {number} code_point The |code_point| to search for in the big5
  41. * index.
  42. * @return {?number} The code point corresponding to |pointer| in |index|,
  43. * or null if |code point| is not in the big5 index.
  44. */
  45. export declare function indexBig5PointerFor(code_point: number): number | null;