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

Better align TypeScript type checking in web-forms, .vue modules #212

Open
eyelidlessness opened this issue Sep 11, 2024 · 1 comment
Open

Comments

@eyelidlessness
Copy link
Member

eyelidlessness commented Sep 11, 2024

As I've been reviewing #183, trying a change I want to suggest produced a very surprising type for a destructured array member. What surprised me is that I expected it to be string | undefined, but it is not!

As it turns out, the TypeScript configurations in @getodk/web-forms are much less strict than throughout the rest of the project. We should make these consistent. We should also consider sharing a great deal more between configs so it's less likely for discrepancies like this to occur.

@eyelidlessness
Copy link
Member Author

We probably want to align more, but these definitely stand out:

  • strict should be true
  • noUncheckedIndexedAccess, which is oddly not part of the strict catch-all, should also be true

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

No branches or pull requests

1 participant