Skip to content

Stop accessing possibly undefined or assume array length without any checks #40

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

Open
FranjoMindek opened this issue Apr 9, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@FranjoMindek
Copy link
Contributor

Turning on strict setting in tsc showed we had many assumptions about data which may not hold true.
A lot of code accesses possibly undefined objects, or assumes arrays are of certain size without any checks.
We should add proper checks before accessing possibly undefined data.

@FranjoMindek FranjoMindek changed the title Make wasp-bot more stable/safe Stop accessing possibly undefined or assume array length without any checks Apr 9, 2025
@Martinsos
Copy link
Member

Or would be even better if we can possibly ensure at type level that they are not undefined (either by doing the validation early, or because we actually know so from the start).

@FranjoMindek
Copy link
Contributor Author

That's the goal. Ensure they are not undefined so we can access them freely.

@FranjoMindek FranjoMindek added the enhancement New feature or request label Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants