Adapt the return type of attr() with one parameter of type string to be Attribute.

See here how it is used:
https://github.com/polotek/libxmljs/blame/master/README.md#L26
I also tried it locally and verified that the returned object has all of the methods of Attribute.
This commit is contained in:
Ole Rehmsen
2015-10-05 20:16:08 +02:00
parent 3f5a84e66b
commit 4b7a4f1e49
+1 -1
View File
@@ -42,7 +42,7 @@ declare module "libxmljs" {
name():string;
name(newName:string):void;
text():string;
attr(name:string):string;
attr(name:string):Attribute;
attr(attr:Attribute):void;
attr(attrObject:{[key:string]:string;}):void;
attrs():Attribute[];