https://arethetypeswrong.github.io/?p=preact-render-to-string%406.6.5
I started working on this a bit, but the repo needs a bit of a larger overhaul that would be better for a maintainer to do.
// main.mts
import renderToString, { shallowRender, render } from "preact-render-to-string/jsx";
import { h } from "preact";
console.log(shallowRender);
console.log(render);
console.log(renderToString(h("div", {})))
> npx tsc --noEmit
main.mts:6:13 - error TS2349: This expression is not callable.
Type 'typeof import("V:/scratch/node_modules/preact-render-to-string/dist/jsx")' has no call signatures.
6 console.log(renderToString(h("div", {})))
~~~~~~~~~~~~~~
Found 1 error in main.mts:6
https://arethetypeswrong.github.io/?p=preact-render-to-string%406.6.5
I started working on this a bit, but the repo needs a bit of a larger overhaul that would be better for a maintainer to do.