defs.d.ts 675 B

123456789101112131415161718192021
  1. /**
  2. * Extract definitions from SVG
  3. *
  4. * Can be used with other tags, but name kept for backwards compatibility.
  5. * Should be used only with tags that cannot be nested, such as masks, clip paths, etc.
  6. */
  7. interface SplitSVGDefsResult {
  8. defs: string;
  9. content: string;
  10. }
  11. declare function splitSVGDefs(content: string, tag?: string): SplitSVGDefsResult;
  12. /**
  13. * Merge defs and content
  14. */
  15. declare function mergeDefsAndContent(defs: string, content: string): string;
  16. /**
  17. * Wrap SVG content, without wrapping definitions
  18. */
  19. declare function wrapSVGContent(body: string, start: string, end: string): string;
  20. export { mergeDefsAndContent, splitSVGDefs, wrapSVGContent };