Closed jorg-vr closed 11 months ago
Thank you so much, I don't know if I would have been able to figure this out! I didn't know this was a problem I had to worry about, why doesn't it complain about TS errors when building??? Anyway, I released 1.3.4.
This pr fixes the building of types.
The issue was typescript breaking because it autodetected the return type of the function to be
Promise<PyodideAPI>
. This returned an error asPyodideAPI
is not exported by pyodide and thus cannot be used as the type of an exported function.It is fixed by explicitly specifying the return type.
The resulting code is the same as pyodide defines:
Closes https://github.com/alexmojaki/pyodide-worker-runner/issues/32