Adapt the return type of attr() with one parameter of type string to be Attribute.
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.

Softpagehomeware/DefinitelyTyped,rschmukler/DefinitelyTyped,esperco/DefinitelyTyped,mattanja/DefinitelyTyped,aindlq/DefinitelyTyped,ryan-codingintrigue/DefinitelyTyped,hatz48/DefinitelyTyped,hatz48/DefinitelyTyped,egeland/DefinitelyTyped,richardTowers/DefinitelyTyped,mjjames/DefinitelyTyped,drinchev/DefinitelyTyped,KonaTeam/DefinitelyTyped,nabeix/DefinitelyTyped,GlennQuirynen/DefinitelyTyped,rolandzwaga/DefinitelyTyped,slavomirvojacek/adbrain-typescript-definitions,jraymakers/DefinitelyTyped,paulmorphy/DefinitelyTyped,bdoss/DefinitelyTyped,laco0416/DefinitelyTyped,paulmorphy/DefinitelyTyped,Softpagehomeware/DefinitelyTyped,mcrawshaw/DefinitelyTyped,AgentME/DefinitelyTyped,abner/DefinitelyTyped,arma-gast/DefinitelyTyped,markogresak/DefinitelyTyped,optical/DefinitelyTyped,mattanja/DefinitelyTyped,borisyankov/DefinitelyTyped,reppners/DefinitelyTyped,zuzusik/DefinitelyTyped,nainslie/DefinitelyTyped,alvarorahul/DefinitelyTyped,minodisk/DefinitelyTyped,AyaMorisawa/DefinitelyTyped,georgemarshall/DefinitelyTyped,Pro/DefinitelyTyped,Zzzen/DefinitelyTyped,jasonswearingen/DefinitelyTyped,Litee/DefinitelyTyped,johan-gorter/DefinitelyTyped,olemp/DefinitelyTyped,Litee/DefinitelyTyped,nobuoka/DefinitelyTyped,UzEE/DefinitelyTyped,psnider/DefinitelyTyped,timjk/DefinitelyTyped,bdoss/DefinitelyTyped,mattblang/DefinitelyTyped,ryan10132/DefinitelyTyped,GiedriusGrabauskas/DefinitelyTyped,onecentlin/DefinitelyTyped,zuzusik/DefinitelyTyped,arcticwaters/DefinitelyTyped,frogcjn/DefinitelyTyped,jbrantly/DefinitelyTyped,mcrawshaw/DefinitelyTyped,herrmanno/DefinitelyTyped,alextkachman/DefinitelyTyped,Penryn/DefinitelyTyped,AgentME/DefinitelyTyped,chrootsu/DefinitelyTyped,fredgalvao/DefinitelyTyped,alexdresko/DefinitelyTyped,bridge-ufsc/DefinitelyTyped,GlennQuirynen/DefinitelyTyped,nmalaguti/DefinitelyTyped,danfma/DefinitelyTyped,borisyankov/DefinitelyTyped,rcchen/DefinitelyTyped,giggio/DefinitelyTyped,alainsahli/DefinitelyTyped,lseguin42/DefinitelyTyped,pocesar/DefinitelyTyped,johan-gorter/DefinitelyTyped,CodeZombieCH/DefinitelyTyped,mareek/DefinitelyTyped,scriby/DefinitelyTyped,arusakov/DefinitelyTyped,subash-a/DefinitelyTyped,Dominator008/DefinitelyTyped,abbasmhd/DefinitelyTyped,florentpoujol/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,subash-a/DefinitelyTyped,drinchev/DefinitelyTyped,sergey-buturlakin/DefinitelyTyped,mareek/DefinitelyTyped,jasonswearingen/DefinitelyTyped,optical/DefinitelyTyped,wilfrem/DefinitelyTyped,dydek/DefinitelyTyped,donnut/DefinitelyTyped,martinduparc/DefinitelyTyped,RX14/DefinitelyTyped,isman-usoh/DefinitelyTyped,pwelter34/DefinitelyTyped,RedSeal-co/DefinitelyTyped,gyohk/DefinitelyTyped,axelcostaspena/DefinitelyTyped,mattblang/DefinitelyTyped,mhegazy/DefinitelyTyped,dflor003/DefinitelyTyped,flyfishMT/DefinitelyTyped,yuit/DefinitelyTyped,emanuelhp/DefinitelyTyped,applesaucers/lodash-invokeMap,donnut/DefinitelyTyped,PopSugar/DefinitelyTyped,jimthedev/DefinitelyTyped,arusakov/DefinitelyTyped,damianog/DefinitelyTyped,OpenMaths/DefinitelyTyped,UzEE/DefinitelyTyped,slavomirvojacek/adbrain-typescript-definitions,raijinsetsu/DefinitelyTyped,QuatroCode/DefinitelyTyped,slavomirvojacek/DefinitelyTyped,pwelter34/DefinitelyTyped,tan9/DefinitelyTyped,egeland/DefinitelyTyped,stacktracejs/DefinitelyTyped,bridge-ufsc/DefinitelyTyped,stephenjelfs/DefinitelyTyped,magny/DefinitelyTyped,ajtowf/DefinitelyTyped,mweststrate/DefinitelyTyped,florentpoujol/DefinitelyTyped,sixinli/DefinitelyTyped,DzmitryDulko/DefinitelyTyped,nmalaguti/DefinitelyTyped,Zorgatone/DefinitelyTyped,lbesson/DefinitelyTyped,mhegazy/DefinitelyTyped,slavomirvojacek/DefinitelyTyped,magny/DefinitelyTyped,wilfrem/DefinitelyTyped,dmoonfire/DefinitelyTyped,chrismbarr/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,TrabacchinLuigi/DefinitelyTyped,sledorze/DefinitelyTyped,one-pieces/DefinitelyTyped,emanuelhp/DefinitelyTyped,Dashlane/DefinitelyTyped,psnider/DefinitelyTyped,alexdresko/DefinitelyTyped,YousefED/DefinitelyTyped,glenndierckx/DefinitelyTyped,xStrom/DefinitelyTyped,georgemarshall/DefinitelyTyped,mcliment/DefinitelyTyped,progre/DefinitelyTyped,bennett000/DefinitelyTyped,use-strict/DefinitelyTyped,chrismbarr/DefinitelyTyped,jsaelhof/DefinitelyTyped,shlomiassaf/DefinitelyTyped,arma-gast/DefinitelyTyped,Zzzen/DefinitelyTyped,daptiv/DefinitelyTyped,adamcarr/DefinitelyTyped,chbrown/DefinitelyTyped,MugeSo/DefinitelyTyped,Karabur/DefinitelyTyped,smrq/DefinitelyTyped,benishouga/DefinitelyTyped,syuilo/DefinitelyTyped,eugenpodaru/DefinitelyTyped,YousefED/DefinitelyTyped,wcomartin/DefinitelyTyped,sandersky/DefinitelyTyped,jimthedev/DefinitelyTyped,nfriend/DefinitelyTyped,dydek/DefinitelyTyped,Zorgatone/DefinitelyTyped,vasek17/DefinitelyTyped,ajtowf/DefinitelyTyped,stacktracejs/DefinitelyTyped,sclausen/DefinitelyTyped,iCoreSolutions/DefinitelyTyped,gyohk/DefinitelyTyped,hellopao/DefinitelyTyped,use-strict/DefinitelyTyped,Bunkerbewohner/DefinitelyTyped,mshmelev/DefinitelyTyped,schmuli/DefinitelyTyped,whoeverest/DefinitelyTyped,newclear/DefinitelyTyped,smrq/DefinitelyTyped,georgemarshall/DefinitelyTyped,flyfishMT/DefinitelyTyped,nakakura/DefinitelyTyped,benliddicott/DefinitelyTyped,alvarorahul/DefinitelyTyped,philippstucki/DefinitelyTyped,jsaelhof/DefinitelyTyped,xStrom/DefinitelyTyped,pocesar/DefinitelyTyped,dsebastien/DefinitelyTyped,trystanclarke/DefinitelyTyped,isman-usoh/DefinitelyTyped,progre/DefinitelyTyped,abner/DefinitelyTyped,damianog/DefinitelyTyped,aciccarello/DefinitelyTyped,MugeSo/DefinitelyTyped,DzmitryDulko/DefinitelyTyped,micurs/DefinitelyTyped,davidpricedev/DefinitelyTyped,Dashlane/DefinitelyTyped,amanmahajan7/DefinitelyTyped,hellopao/DefinitelyTyped,martinduparc/DefinitelyTyped,Ptival/DefinitelyTyped,aciccarello/DefinitelyTyped,esperco/DefinitelyTyped,nitintutlani/DefinitelyTyped,subjectix/DefinitelyTyped,arcticwaters/DefinitelyTyped,bilou84/DefinitelyTyped,nitintutlani/DefinitelyTyped,rolandzwaga/DefinitelyTyped,mshmelev/DefinitelyTyped,takenet/DefinitelyTyped,amanmahajan7/DefinitelyTyped,newclear/DefinitelyTyped,benishouga/DefinitelyTyped,laurentiustamate94/DefinitelyTyped,trystanclarke/DefinitelyTyped,sclausen/DefinitelyTyped,Syati/DefinitelyTyped,Ptival/DefinitelyTyped,scriby/DefinitelyTyped,nycdotnet/DefinitelyTyped,takenet/DefinitelyTyped,behzad888/DefinitelyTyped,elisee/DefinitelyTyped,OfficeDev/DefinitelyTyped,rschmukler/DefinitelyTyped,frogcjn/DefinitelyTyped,fredgalvao/DefinitelyTyped,rcchen/DefinitelyTyped,musicist288/DefinitelyTyped,GiedriusGrabauskas/DefinitelyTyped,AyaMorisawa/DefinitelyTyped,aciccarello/DefinitelyTyped,schmuli/DefinitelyTyped,olemp/DefinitelyTyped,nainslie/DefinitelyTyped,jraymakers/DefinitelyTyped,amir-arad/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,tan9/DefinitelyTyped,HPFOD/DefinitelyTyped,reppners/DefinitelyTyped,Syati/DefinitelyTyped,georgemarshall/DefinitelyTyped,dsebastien/DefinitelyTyped,raijinsetsu/DefinitelyTyped,minodisk/DefinitelyTyped,jimthedev/DefinitelyTyped,schmuli/DefinitelyTyped,ashwinr/DefinitelyTyped,Karabur/DefinitelyTyped,danfma/DefinitelyTyped,AgentME/DefinitelyTyped,dmoonfire/DefinitelyTyped,TrabacchinLuigi/DefinitelyTyped,evandrewry/DefinitelyTyped,BrandonCKrueger/DefinitelyTyped,opichals/DefinitelyTyped,vagarenko/DefinitelyTyped,benishouga/DefinitelyTyped,shlomiassaf/DefinitelyTyped,gandjustas/DefinitelyTyped,zuzusik/DefinitelyTyped,sledorze/DefinitelyTyped,erosb/DefinitelyTyped,glenndierckx/DefinitelyTyped,gcastre/DefinitelyTyped,QuatroCode/DefinitelyTyped,arusakov/DefinitelyTyped,moonpyk/DefinitelyTyped,Dominator008/DefinitelyTyped,omidkrad/DefinitelyTyped,EnableSoftware/DefinitelyTyped,AgentME/DefinitelyTyped,pocesar/DefinitelyTyped,nakakura/DefinitelyTyped,philippstucki/DefinitelyTyped,OpenMaths/DefinitelyTyped,onecentlin/DefinitelyTyped,stephenjelfs/DefinitelyTyped,chrootsu/DefinitelyTyped,gcastre/DefinitelyTyped,greglo/DefinitelyTyped,applesaucers/lodash-invokeMap,sergey-buturlakin/DefinitelyTyped,bennett000/DefinitelyTyped,Penryn/DefinitelyTyped,gandjustas/DefinitelyTyped,nobuoka/DefinitelyTyped,CodeZombieCH/DefinitelyTyped,mjjames/DefinitelyTyped,syuilo/DefinitelyTyped,martinduparc/DefinitelyTyped,bluong/DefinitelyTyped,abbasmhd/DefinitelyTyped,yuit/DefinitelyTyped,behzad888/DefinitelyTyped,elisee/DefinitelyTyped,hellopao/DefinitelyTyped,Pro/DefinitelyTyped,nycdotnet/DefinitelyTyped,vagarenko/DefinitelyTyped,davidpricedev/DefinitelyTyped,RX14/DefinitelyTyped,alextkachman/DefinitelyTyped,algorithme/DefinitelyTyped,psnider/DefinitelyTyped,EnableSoftware/DefinitelyTyped,greglo/DefinitelyTyped,teves-castro/DefinitelyTyped,teves-castro/DefinitelyTyped,HPFOD/DefinitelyTyped,ashwinr/DefinitelyTyped