fix: 🐛 fix types

This commit is contained in:
bubkoo
2021-04-06 09:35:32 +08:00
parent b1bff0f586
commit 1f8db03527
3 changed files with 5 additions and 6 deletions

View File

@ -7,8 +7,8 @@ import { Util } from '../util'
import { Container } from './container'
export abstract class GeometryContainer<
TSVGGElement extends SVGAElement | SVGGElement
> extends Container<TSVGGElement> {
TSVGElement extends SVGAElement | SVGGElement
> extends Container<TSVGElement> {
dmove(dx: number | string = 0, dy: number | string = 0) {
this.eachChild<VectorElement>((child) => {
const bbox = child.bbox()

View File

@ -3,13 +3,12 @@ import { Point } from '../../struct/point'
import { VectorElement } from '../element'
export class Viewbox<
TSVGContainerElement extends
TSVGElement extends
| SVGSVGElement
| SVGSymbolElement
| SVGImageElement
| SVGPatternElement
| SVGMarkerElement
> extends VectorElement<TSVGContainerElement> {
> extends VectorElement<TSVGElement> {
viewbox(): Box
viewbox(box: Box.BoxLike): this
viewbox(

View File

@ -62,7 +62,7 @@ export class LineExtension<
| SVGLineElement
| SVGPathElement
| SVGPolygonElement
| SVGPolygonElement
| SVGPolylineElement
> extends Vector<TSVGLineElement> {
marker(type: Marker.Type, marker: Marker): this
marker(type: Marker.Type, size: number | string, attrs?: Attrs | null): this