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

Use TypeScript to verify CLI reference output #4311

Merged
merged 6 commits into from
Dec 7, 2024

Conversation

RunDevelopment
Copy link
Contributor

@RunDevelopment RunDevelopment commented Nov 30, 2024

This PR adds a new CI test that uses the TypeScript compiler to verify that all JS and TS files in cli/tests/references are valid JS/TS. This ensures that invalid JS/TS will be caught even if human review misses some error.

Since I use the TS compiler to verify JS files, I also enabled type checking for them. So we will hopefully catch invalid glue code early now.


I'm still working out the kinks.

@RunDevelopment RunDevelopment marked this pull request as ready for review November 30, 2024 16:15
@RunDevelopment
Copy link
Contributor Author

Alright, I changed it to only check JS syntax for now. Fixing all the type errors in JS will require some more work, but that can be a follow-up PR.

For now, this PR just checks the types of .d.ts files and the syntax of .js files.

.github/workflows/main.yml Outdated Show resolved Hide resolved
.github/workflows/main.yml Show resolved Hide resolved
@daxpedda daxpedda added the waiting for author Waiting for author to respond label Dec 6, 2024
@daxpedda daxpedda merged commit 5b38cb1 into rustwasm:main Dec 7, 2024
54 of 55 checks passed
@daxpedda
Copy link
Collaborator

daxpedda commented Dec 7, 2024

This is great btw, thank you!

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

Successfully merging this pull request may close these issues.

2 participants