// trick to keep reference to Array build-in type\r
declare class BuiltInArray<T> extends Array<T> { }\r
\r
+// trick to have nice attribute list for CSS\r
+declare type CSSStyleName = Exclude<keyof CSSStyleDeclaration, "parentRule" | "length" >\r
+\r
declare module "@svgdotjs/svg.js" {\r
\r
function SVG(): Svg;\r
toggleClass(name: string): this\r
\r
// prototype method register in css.js\r
- css(): object;\r
- css(style: string): string\r
- css(style: string[]): object;\r
- css(style: string, val: any): this\r
- css(style: object): this\r
+ css(): Partial<CSSStyleDeclaration>\r
+ css<T extends CSSStyleName>(style: T): CSSStyleDeclaration[T]\r
+ css<T extends CSSStyleName[]>(style: T): Partial<CSSStyleDeclaration>\r
+ css<T extends CSSStyleName>(style: T, val: CSSStyleDeclaration[T]): this\r
+ css(style: Partial<CSSStyleDeclaration>): this\r
show(): this\r
hide(): this\r
visible(): boolean\r