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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert WASM bridge to TypeScript #130

Merged
merged 8 commits into from Aug 11, 2022
Merged

Conversation

aomarks
Copy link
Contributor

@aomarks aomarks commented Aug 10, 2022

As discussed in #127, this PR converts the WASM JavaScript bridge to TypeScript.

I suggest looking at each commit individually for the best diffs. There's an intermediate commit that shows the differences between the original and newly generated .js and d.ts files. The next commit deletes them, since I don't think we want those artifacts checked in?

There shouldn't be any user-affecting changes in this PR. dist/lexer.js ends up being byte-for-byte identical, and types/lexer.d.ts should be semantically identical (verified manually), though with slightly different formatting.

For the build, I am using swc + chomp to generate the .js file as requested in #127 (comment). It worked great! However, since swc doesn't generate .d.ts files, I also included a chomp tsc step with the --emitDeclarationOnly flag. Hopefully this is OK? The two steps can at least run in parallel.

Thanks!

Copy link
Owner

@guybedford guybedford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for posting, this all looks great to me, happy to merge and release, just see the two comments in the review.

src/lexer.ts Outdated Show resolved Hide resolved
chompfile.toml Outdated Show resolved Hide resolved
aomarks and others added 2 commits August 11, 2022 08:20
Co-authored-by: Guy Bedford <guybedford@gmail.com>
@aomarks
Copy link
Contributor Author

aomarks commented Aug 11, 2022

Thanks for posting, this all looks great to me, happy to merge and release, just see the two comments in the review.

Thanks! Comments addressed.

chompfile.toml Outdated Show resolved Hide resolved
@guybedford guybedford merged commit 0c2e094 into guybedford:main Aug 11, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants