From: Youngrok Kim Date: Sat, 20 May 2017 07:42:32 +0000 (+0900) Subject: Add missing type definitions to svg.js.d.ts (#680) X-Git-Tag: 2.6.2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d80d692271345f73c45be0b67d44e3e3c1ecf35c;p=svg.js.git Add missing type definitions to svg.js.d.ts (#680) --- diff --git a/svg.js.d.ts b/svg.js.d.ts index ec803bd..eba2f29 100644 --- a/svg.js.d.ts +++ b/svg.js.d.ts @@ -62,6 +62,7 @@ declare namespace svgjs { // attr.js interface Element { + attr(): object; attr(name: string): any; attr(obj: Object): this; attr(name: string, value: any, namespace?: string): this; @@ -712,6 +713,7 @@ declare namespace svgjs { // rect.js export interface Rect extends Shape { new (): Rect; + radius(x: number, y?: number): this; } interface Library { Rect: Rect; } interface Container { @@ -821,9 +823,9 @@ declare namespace svgjs { } interface FontData { family?: string; - size?: number; + size?: NumberAlias; anchor?: string; - leading?: string; + leading?: NumberAlias; weight?: string; style?: string } @@ -842,8 +844,9 @@ declare namespace svgjs { text(text: string): this; text(block: (text: Text) => void): this; size(fontSize: NumberAlias): this; - leading(leading: number): this; - lines(): number; + leading(): number; + leading(leading: NumberAlias): this; + lines(): Set; rebuild(enabled: boolean): this; build(enabled: boolean): this; plain(text: string): this; @@ -986,6 +989,7 @@ declare namespace svgjs { attr(name: string, value: any, namespace?: string): Animation; attr(obj: Object): Animation; attr(name: string): any; + attr(): object; viewbox(x: number, y: number, w: number, h: number): Animation;