Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building types #33

Merged
merged 1 commit into from
Nov 24, 2023
Merged

Fix building types #33

merged 1 commit into from
Nov 24, 2023

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Nov 24, 2023

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 as PyodideAPI 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:

export declare type PyodideInterface = typeof PyodideAPI;

Closes #32

@alexmojaki alexmojaki merged commit d580a76 into alexmojaki:master Nov 24, 2023
1 check failed
@alexmojaki
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version 1.3.3 does not provides types
2 participants