Isolating IDs inside layouts with typescript

Can you pleaase tell my how can I write this line of code using the new typescript definitions?
var list1 = $$(“col1”).$$(“mylist”);

Thanks

What kind of view is “col1” ?

The definition file expects that $$ method returns common webix view and common webix.view doesn’t have such method as “$$”

col1 is a webix.ui.layout view… but phpstorm tells me that “$$” method doesn’t exists in webix.ui.layout. It seems that exists only as webix.$$

This is my code:
var scheda:webix.ui.layout = <webix.ui.layout> webix.$$(“col1”);

var mylist:webix.ui.list = <webix.ui.list> scheda.$$(“mylist”);

and the error is on the second line: unresolved function or method $$()

The $$ function can return different views. When you are using it in code, typescript can’t detect what type of view is returned by $$(“col1”) by default it uses webix.ui.baseview

you can use something like next

var layout:webix.ui.layout = $$("col1");
      layout.addView(some); 

in above case the type hinting will work correctly.

The case with $$(“col1”).$$ is not handler correctly by current version of definition file, as default layout doesn’t support such method and only layout with “isolate” true do have it.

You may try to use the next

interface iLayout extends webix.ui.layout, webix.IdSpace{ }

var c:iLayout = $$("col1");
      c.$$("mylist")