Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm-pack fake so CI tests and the like don't have to do any rust compilation #1337

Open
SIGSTACKFAULT opened this issue Oct 5, 2023 · 1 comment

Comments

@SIGSTACKFAULT
Copy link

SIGSTACKFAULT commented Oct 5, 2023

馃挕 Feature description

add wasm-pack fake <package name> which generates a fake package to make TypeScript happy, and puts it right in node_modules.
So CI jobs don't have to spend like 5 minutes building rust just to type-check the TypeScript part of the project.

If you want to check against the WASM bindings you can just not use this feature.

I think the name of the module you want should be an argument so that, you don't even need to have the rust code (e.g., if it's in a submodule and you don't want to waste time downloading)

馃捇 Basic example

I think all that's necessary is to generate:

node_modules/foo/package.json

{
  "name": "foo",
  "types": "foo.d.ts"
}

node_modules/foo/foo.d.ts

declare module "foo";
@SIGSTACKFAULT
Copy link
Author

epic issue number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant