parse.d.mts 990 B

1234567891011121314151617181920212223242526272829303132
  1. import { IconifyJSON } from '@iconify/types';
  2. /**
  3. * Parsed icon
  4. */
  5. interface PreparedEmojiIcon {
  6. icon: string;
  7. sequence: string;
  8. }
  9. /**
  10. * Parse
  11. */
  12. interface PreparedEmojiResult {
  13. icons: PreparedEmojiIcon[];
  14. regex: string;
  15. }
  16. /**
  17. * Prepare emoji for icons list
  18. *
  19. * Test data should be fetched from 'https://unicode.org/Public/emoji/15.1/emoji-test.txt'
  20. * It is used to detect missing emojis and optimise regular expression
  21. */
  22. declare function prepareEmojiForIconsList(icons: Record<string, string>, rawTestData?: string): PreparedEmojiResult;
  23. /**
  24. * Prepare emoji for an icon set
  25. *
  26. * Test data should be fetched from 'https://unicode.org/Public/emoji/15.1/emoji-test.txt'
  27. * It is used to detect missing emojis and optimise regular expression
  28. */
  29. declare function prepareEmojiForIconSet(iconSet: IconifyJSON, rawTestData?: string): PreparedEmojiResult;
  30. export { type PreparedEmojiIcon, type PreparedEmojiResult, prepareEmojiForIconSet, prepareEmojiForIconsList };