localize.d.ts 782 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import type { Localize } from "../../types.js";
  2. type hiLocaleNumberType =
  3. | "\u0967"
  4. | "\u0968"
  5. | "\u0969"
  6. | "\u096A"
  7. | "\u096B"
  8. | "\u096C"
  9. | "\u096D"
  10. | "\u096E"
  11. | "\u096F"
  12. | "\u0966";
  13. type enLocaleNumberType =
  14. | "1"
  15. | "2"
  16. | "3"
  17. | "4"
  18. | "5"
  19. | "6"
  20. | "7"
  21. | "8"
  22. | "9"
  23. | "0";
  24. type enHiLocaleNumberType = {
  25. [enNumber in enLocaleNumberType]: hiLocaleNumberType;
  26. };
  27. type hiLocaleEnNumberType = {
  28. [hiNumber in hiLocaleNumberType]: enLocaleNumberType;
  29. };
  30. export interface hiLocaleNumberValuesType {
  31. locale: enHiLocaleNumberType;
  32. number: hiLocaleEnNumberType;
  33. }
  34. export declare function localeToNumber(locale: string): number;
  35. export declare function numberToLocale(enNumber: number): string;
  36. export declare const localize: Localize;
  37. export {};