Skip to content

[@types/emscripten]: preRunmissing arg #18789

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

Open
jeswr opened this issue Feb 18, 2023 · 3 comments
Open

[@types/emscripten]: preRunmissing arg #18789

jeswr opened this issue Feb 18, 2023 · 3 comments

Comments

@jeswr
Copy link
Contributor

jeswr commented Feb 18, 2023

Currently the type signature of preRun is (() => void)[]. Instead it should be more like

type singlePreRunType = ((arg: SWIPLModule) => void) | (() => void);
type preRunType = singlePreRunType | singlePreRunType[] | undefined;

as can be seen in the usage in https://github.com/eyereasoner/eye-js/pull/79/files

Also reported in SWI-Prolog/npm-swipl-wasm#13

@sbc100
Copy link
Collaborator

sbc100 commented Feb 18, 2023

Do we defined those types here in this repo? (i'm not sure this is the correct repo for this bug).

@jeswr
Copy link
Contributor Author

jeswr commented Feb 18, 2023

Indeed type definitions are hosted in https://github.com/DefinitelyTyped/DefinitelyTyped/. However, a bug report in that repo is likely just to get lost in the noise of all the other packages that the type definitions are hosted for - which is why I opened it here.

@sbc100
Copy link
Collaborator

sbc100 commented Feb 19, 2023

But the maintainers of this repo don't maintain those types so I'm not sure what we should do. Do you want to send them a PR maybe?

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

No branches or pull requests

2 participants