Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
mbasso committed Oct 30, 2018
1 parent 0bc7bba commit f31cc80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type JsCallback = (context: {
instance: WebAssembly.Instance,
importObject: importObject,
params: any,
}) => Promise<any>;
}) => any;

type WasmWorkerModule = {
exports: {
Expand All @@ -78,7 +78,7 @@ type WasmWorkerModule = {
// run a js function inside the worker and provides it the given params
// ⚠️ Caveat: the function you pass cannot rely on its surrounding scope, since it is executed in an isolated context.
// Please use the "params" parameter to provide some values to the callback
run: (callback: JsCallback, params: any) => Promise<any>
run: (callback: JsCallback, params?: any) => Promise<any>
};

type Options = {
Expand Down

0 comments on commit f31cc80

Please sign in to comment.