creating typescript definitions for YUI 2 -


i want use typescript in our project uses yui 2 trying create definition file it.

what should definition using

new yahoo.widget.panel('test'); 

look like?

i tried

declare module yahoo {   export module util {     export interface panel {       (id: string);     }    } } 

but get

error ts2095: not find symbol 'yahoo' 

when running tsc.

here go :

declare module yahoo{     export module widget{         export class panel{             constructor(element:string);         }     } }  new yahoo.widget.panel('test'); 

try online.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -