-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Generating Flow types #180
Comments
Seems reasonable to me! I'd be down for a PR to add such a flag |
hrm i'm curious about doing this is bindgen and not in wasm-pack, it did seem like there was a very simple solution for doing it in wasm-pack. either way i want to make sure that we are clear on what the default behavior is and that i can make sure to support the correct flags so that this feature is exposed in wasm-pack, assuming we don't implement it there |
This also adds our first wasm module and updates the configuration so that that's possible. I've used wasm-pack to publish a gecko-profiler-demangle module to npm instead of copying the generated code into this repository. I'm not sure if that was a good or a bad idea; I mostly did it so that our Flow and ESLint rules wouldn't be applied to the wasm-bindgen generated code. I've also needed to autogenerate a flow libdef for this module. wasm-bindgen doesn't create those automatically yet: rustwasm/wasm-bindgen#180 I could have created one manually and included it in the published package, but I don't know if wasm-pack would have included my additional files in the published package (via `wasm-pack publish`).
This also adds our first wasm module and updates the configuration so that that's possible. I've used wasm-pack to publish a gecko-profiler-demangle module to npm instead of copying the generated code into this repository. I'm not sure if that was a good or a bad idea; I mostly did it so that our Flow and ESLint rules wouldn't be applied to the wasm-bindgen generated code. I've also needed to autogenerate a flow libdef for this module. wasm-bindgen doesn't create those automatically yet: rustwasm/wasm-bindgen#180 I could have created one manually and included it in the published package, but I don't know if wasm-pack would have included my additional files in the published package (via `wasm-pack publish`).
This also adds our first wasm module and updates the configuration so that that's possible. I've used wasm-pack to publish a gecko-profiler-demangle module to npm instead of copying the generated code into this repository. I'm not sure if that was a good or a bad idea; I mostly did it so that our Flow and ESLint rules wouldn't be applied to the wasm-bindgen generated code. I've also needed to autogenerate a flow libdef for this module. wasm-bindgen doesn't create those automatically yet: rustwasm/wasm-bindgen#180 I could have created one manually and included it in the published package, but I don't know if wasm-pack would have included my additional files in the published package (via `wasm-pack publish`).
This also adds our first wasm module and updates the configuration so that that's possible. I've used wasm-pack to publish a gecko-profiler-demangle module to npm instead of copying the generated code into this repository. I'm not sure if that was a good or a bad idea; I mostly did it so that our Flow and ESLint rules wouldn't be applied to the wasm-bindgen generated code. I've also needed to autogenerate a flow libdef for this module. wasm-bindgen doesn't create those automatically yet: rustwasm/wasm-bindgen#180 I could have created one manually and included it in the published package, but I don't know if wasm-pack would have included my additional files in the published package (via `wasm-pack publish`).
This also adds our first wasm module and updates the configuration so that that's possible. I've used wasm-pack to publish a gecko-profiler-demangle module to npm instead of copying the generated code into this repository. I'm not sure if that was a good or a bad idea; I mostly did it so that our Flow and ESLint rules wouldn't be applied to the wasm-bindgen generated code. I've also needed to autogenerate a flow libdef for this module. wasm-bindgen doesn't create those automatically yet: rustwasm/wasm-bindgen#180 I could have created one manually and included it in the published package, but I don't know if wasm-pack would have included my additional files in the published package (via `wasm-pack publish`).
This also adds our first wasm module and updates the configuration so that that's possible. I've used wasm-pack to publish a gecko-profiler-demangle module to npm instead of copying the generated code into this repository. I'm not sure if that was a good or a bad idea; I mostly did it so that our Flow and ESLint rules wouldn't be applied to the wasm-bindgen generated code. I've also needed to autogenerate a flow libdef for this module. wasm-bindgen doesn't create those automatically yet: rustwasm/wasm-bindgen#180 I could have created one manually and included it in the published package, but I don't know if wasm-pack would have included my additional files in the published package (via `wasm-pack publish`).
This also adds our first wasm module and updates the configuration so that that's possible. I've used wasm-pack to publish a gecko-profiler-demangle module to npm instead of copying the generated code into this repository. I'm not sure if that was a good or a bad idea; I mostly did it so that our Flow and ESLint rules wouldn't be applied to the wasm-bindgen generated code. I've also needed to autogenerate a flow libdef for this module. wasm-bindgen doesn't create those automatically yet: rustwasm/wasm-bindgen#180 I could have created one manually and included it in the published package, but I don't know if wasm-pack would have included my additional files in the published package (via `wasm-pack publish`).
This also adds our first wasm module and updates the configuration so that that's possible. I've used wasm-pack to publish a gecko-profiler-demangle module to npm instead of copying the generated code into this repository. I'm not sure if that was a good or a bad idea; I mostly did it so that our Flow and ESLint rules wouldn't be applied to the wasm-bindgen generated code. I've also needed to autogenerate a flow libdef for this module. wasm-bindgen doesn't create those automatically yet: rustwasm/wasm-bindgen#180 I could have created one manually and included it in the published package, but I don't know if wasm-pack would have included my additional files in the published package (via `wasm-pack publish`).
Moving from https://github.com/ashleygwilliams/wasm-pack/issues/114#issuecomment-385122076
Flow's type def format is very similar to TypeScript's, it would be awesome if wasm-bindgen generated types for both.
I've actually implemented a type def printer for both at the same time in the past (only in JavaScript), it's not hard.
This is (basically) how I did it:
The text was updated successfully, but these errors were encountered: