typehole
typehole copied to clipboard
Use type assertion when no variable binding is around
So instead of using a generic type variable in the typehole, the plugin could add
import App from "./App.svelte";
import typehole from "typehole";
type AutoDiscovered = any;
const app = new App({
target: typehole.t<AutoDiscovered>(document.getElementById("app")),
});
export default app;
import App from "./App.svelte";
import typehole from "typehole";
type AutoDiscovered = any;
const app = new App({
target: typehole.t(document.getElementById("app") as AutoDiscovered),
});
export default app;