npm-swipl-wasm icon indicating copy to clipboard operation
npm-swipl-wasm copied to clipboard

`preRun` type is incorrect

Open jeswr opened this issue 2 years ago • 0 comments

This is likely to be an upsteam issue in @types/emscripten, but I do not have the time to investigate fully right now.

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

jeswr avatar Jan 30 '23 00:01 jeswr