From 89c8621426f8d18fbe9afafefb48a976f5e74653 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 30 Jan 2018 07:37:25 -0800 Subject: [PATCH] Flag `free()` as returning `void` --- crates/wasm-bindgen-cli-support/src/js.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wasm-bindgen-cli-support/src/js.rs b/crates/wasm-bindgen-cli-support/src/js.rs index 19673459..5336add8 100644 --- a/crates/wasm-bindgen-cli-support/src/js.rs +++ b/crates/wasm-bindgen-cli-support/src/js.rs @@ -236,7 +236,7 @@ impl<'a> Js<'a> { wasm.{}(ptr); }} ", s.free_function())); - ts_dst.push_str("free();\n"); + ts_dst.push_str("free(): void;\n"); for function in s.functions.iter() { let (js, ts) = self.generate_function(