From 2850cfc78eef21a56377a65dc7def162ad5ceb08 Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Thu, 9 May 2019 11:01:45 -0700 Subject: [PATCH 1/2] update init function export --- crates/cli-support/src/js/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cli-support/src/js/mod.rs b/crates/cli-support/src/js/mod.rs index 1b176639..931e2c05 100644 --- a/crates/cli-support/src/js/mod.rs +++ b/crates/cli-support/src/js/mod.rs @@ -922,7 +922,7 @@ impl<'a> Context<'a> { *\n\ * @returns {{Promise}}\n\ */\n\ - export function init \ + export default function init \ (module_or_path: RequestInfo | BufferSource | WebAssembly.Module{}): Promise; ", memory_doc, memory_param From 9b5de9f88d48d166fd0a30a1ee22142a2d2a35cc Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Thu, 9 May 2019 11:12:45 -0700 Subject: [PATCH 2/2] update init test --- crates/typescript-tests/src/web/init.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/typescript-tests/src/web/init.ts b/crates/typescript-tests/src/web/init.ts index 623efe72..1f76570e 100644 --- a/crates/typescript-tests/src/web/init.ts +++ b/crates/typescript-tests/src/web/init.ts @@ -1,3 +1,3 @@ -import * as wbg from '../../pkg/web/typescript_tests'; +import initialize from "../../pkg/web/typescript_tests"; -const init: Promise = wbg.init('.'); \ No newline at end of file +const init: Promise = initialize(".");