Open ogoffart opened 8 months ago
Is it possible to have it both as a tagged template and as a "namespace" with the runEventLoop and other classes and interface?
I don't believe that is possible. It would have to be
import { slint }, * as the_rest from "slint-ui";
let instance = slint`...`;
I thought about this but I'm not sure anymore it's really worth the "convenience", for two reasons:
If we want to have a way of creating a component instance from just a string, why don't we use a regular function?
let instance = slint.createInstanceFromString(
export component App { ... });
Imagine:
slint
could be a tagged template that just callsloadSource
Is it possible to have it both as a tagged template and as a "namespace" with the runEventLoop and other classes and interface?Also we can extend the LSP and language to also highlight code in a
slint`
template the same way we highlight inside a rust macro. (Grep forextract_rust_macro
and see slint.injections.json)