-
Notifications
You must be signed in to change notification settings - Fork 438
refactor: typecheck tests #7095
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
Conversation
6618c34 to
d873e25
Compare
serhalp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:grindog:
|
@serhalp Thanks for having a look! This PR isn't yet ready for review, but I'll tag you on it when it's done. |
3bedf7d to
3f6a850
Compare
This change separates the TypeScript configuration into two configurations: - `tsconfig.json`: Non-artifact-emitting configuration for development- time typechecking - `tsconfig.build.json`: Artifact-emitting configuration used to build the project This includes no functional changes and is simply setup for future typechecking improvements.
3f6a850 to
54b8c13
Compare
serhalp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏🏼 Amazing, thanks for fixing this!
| // @ts-expect-error: We can't import Deno types without polluting the global environment | ||
| // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like withEdgeFunction's handler arg also accepts a string, so another option would be to just pass this handler fixture as a raw string instead of pretending it's valid JS in this context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think we should do this for all the fixtures--I'll do it in a separate PR when I get back. (Another reason to do it: you can currently reference in-scope variables but the test will end up failing.)
Most editors (and Prettier) will recognize code in javascript and typescript template tags and format the code accordingly, so I think that's a better alternative.
This changeset enables typechecking on test files. It:
tsconfig.json: Non-artifact-emitting configuration for development-time typecheckingtsconfig.build.json: Artifact-emitting configuration used to build the projecttsconfig.jsonto run the type checker on test files