版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

name.d.ts 836 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * Icon name
  3. */
  4. interface IconifyIconName {
  5. readonly provider: string;
  6. readonly prefix: string;
  7. readonly name: string;
  8. }
  9. /**
  10. * Icon source: icon object without name
  11. */
  12. type IconifyIconSource = Omit<IconifyIconName, 'name'>;
  13. /**
  14. * Expression to test part of icon name.
  15. */
  16. declare const matchIconName: RegExp;
  17. /**
  18. * Convert string to Icon object.
  19. */
  20. declare const stringToIcon: (value: string, validate?: boolean, allowSimpleName?: boolean, provider?: string) => IconifyIconName | null;
  21. /**
  22. * Check if icon is valid.
  23. *
  24. * This function is not part of stringToIcon because validation is not needed for most code.
  25. */
  26. declare const validateIconName: (icon: IconifyIconName | null, allowSimpleName?: boolean) => boolean;
  27. export { IconifyIconName, IconifyIconSource, matchIconName, stringToIcon, validateIconName };