Phodal
11/14/2025, 1:30 AM/**
* Not working
*/
@JsModule("web-tree-sitter")
external object ParserModule : JsAny {
fun init(): Promise<JsAny>
}
/**
* Final version
*/
@JsFun("async () => { const ts = await import('web-tree-sitter'); await ts.default.init(); return ts.default; }")
external fun initTreeSitter(): Promise<TreeSitterModule>
I want to now for Web version, is its will cause performance issue to use JSFun? Or maybe have better way?tapchicoma
11/14/2025, 11:03 AMbashor
11/14/2025, 1:18 PMbashor
11/14/2025, 1:19 PM@JsModule("web-tree-sitter")
external object WebTreeSitter {
@JsName("default")
object ParserModule : JsAny {
fun init(): Promise<JsAny>
}
}Phodal
11/14/2025, 1:52 PM