]> source.dussan.org Git - svg.js.git/commitdiff
fix: add Fragment declaration in svg.js.d.ts
authorJiande <we1215107007@163.com>
Mon, 14 Aug 2023 10:49:56 +0000 (18:49 +0800)
committerJiande <we1215107007@163.com>
Mon, 14 Aug 2023 10:49:56 +0000 (18:49 +0800)
svg.js.d.ts

index dc61beebaefb89e591e6dfb47642a8f426b28321..d38ef76cf3d8f392bbefa006a4a535ee0eb7dbe1 100644 (file)
@@ -1204,6 +1204,52 @@ declare module '@svgdotjs/svg.js' {
     height: number
   }
 
+  // Fragment is special Container: maybe there is a way to avoid this duplication?
+  class Fragment extends Dom {
+    circle(size?: NumberAlias): Circle
+    circle(size: number, unit: number): Circle
+    clip(): ClipPath
+    ellipse(width?: number, height?: number): Ellipse
+    foreignObject(width: number, height: number): ForeignObject
+    gradient(type: string, block?: (stop: Gradient) => void): Gradient
+    group(): G
+
+    image(): Image
+    image(href?: string, callback?: (e: Event) => void): Image
+    line(points?: PointArrayAlias): Line
+    line(x1: number, y1: number, x2: number, y2: number): Line
+    link(url: string): A
+    marker(
+      width?: number,
+      height?: number,
+      block?: (marker: Marker) => void
+    ): Marker
+    mask(): Mask
+    nested(): Svg
+    path(): Path
+    path(d: PathArrayAlias): Path
+    pattern(
+      width?: number,
+      height?: number,
+      block?: (pattern: Pattern) => void
+    ): Pattern
+    plain(text: string): Text
+    polygon(points?: PointArrayAlias): Polygon
+    polyline(points?: PointArrayAlias): Polyline
+    rect(width?: number, height?: number): Rect
+    style(): Style
+    text(block: (tspan: Tspan) => void): Text
+    text(text: string): Text
+    use(element: Element | string, file?: string): Use
+    viewbox(): Box
+    viewbox(viewbox: ViewBoxLike | string): this
+    viewbox(x: number, y: number, width: number, height: number): this
+    textPath(text: string | Text, path: string | Path): TextPath
+    symbol(): Symbol
+    zoom(): number
+    zoom(level: NumberAlias, point?: Point): this
+  }
+
   class Container extends Element {
     circle(size?: NumberAlias): Circle
     circle(size: number, unit: number): Circle