\r
// array.js\r
type ArrayAlias = _Array | number[] | string;\r
- \r
+\r
interface _Array {\r
new (array?: ArrayAlias, fallback?: number[]): _Array;\r
value: number[];\r
merge(box: Box): Box;\r
transform(m: Matrix): Box\r
}\r
- \r
+\r
export interface BBox extends Box {\r
new (element?: Element): BBox;\r
}\r
unclip(): this;\r
}\r
interface Library { ClipPath: ClipPath; }\r
- \r
+\r
// color.js\r
interface ColorLike {\r
r: number;\r
g: number;\r
b: number;\r
}\r
- \r
+\r
type ColorAlias = string | ColorLike;\r
- \r
+\r
export interface Color extends ColorLike{\r
new (): Color;\r
new (color: ColorAlias): Color;\r
width: number;\r
height:number;\r
}\r
- \r
+\r
export interface Container extends Parent {\r
new (): Container;\r
}\r
}\r
interface Library { Doc: Doc; }\r
\r
+ type ParentTypeAlias = string | Doc | Nested | G;\r
// element.js\r
export interface Element {\r
new (): Element;\r
\r
reference(type: string): Element;\r
\r
+ parent(type?: ParentTypeAlias): Parent;\r
+ doc(): Parent;\r
parents(): Parent[];\r
\r
matches(selector: string): boolean;\r
\r
svg(svg: string): this;\r
svg(): string;\r
- \r
+\r
writeDataToDom(): this,\r
setData(data: object): this,\r
- \r
+\r
is(cls: any): boolean;\r
}\r
interface Library { Element: Element; }\r
offset?: number;\r
opacity?: number;\r
}\r
- \r
+\r
// gradient.js\r
export interface Stop extends Element {\r
new (): Stop;\r
// line.js\r
interface ArrayPoint extends Array<number> { }\r
type PointArrayAlias = ArrayPoint[] | number[] | PointArray | string;\r
- \r
+\r
export interface Line extends Shape {\r
new (): Line;\r
array(): PointArray;\r
f: number;\r
matrix: Matrix;\r
}\r
- \r
+\r
interface MatrixLike {\r
a: number;\r
b: number;\r
e: number;\r
f: number;\r
}\r
- \r
+\r
type MatrixAlias = MatrixLike | number[] | Element | string;\r
- \r
+\r
export interface Matrix {\r
new (): Matrix;\r
new (source: MatrixAlias): Matrix;\r
at(pos: number): _Number;\r
}\r
interface Library { Number: _Number; }\r
- \r
+\r
type NumberAlias = _Number | number | string;\r
\r
// parent.js\r
// path.js\r
interface PathArrayPoint extends Array<number | string> { }\r
type PathArrayAlias = PathArray | (string | number)[] | PathArrayPoint[] | string;\r
- \r
+\r
export interface Path extends Shape {\r
new (): Path;\r
morphArray: PathArray;\r
\r
// viewbox.js\r
type ViewBoxAlias = ViewBoxLike | number[] | string | Element;\r
- \r
+\r
interface ViewBox {\r
new (source: ViewBoxAlias): ViewBox;\r
new (x: number, y: number, width: number, height: number): ViewBox;\r