Skip to content

Turn strictNullChecks on #174

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
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

NathanLaing
Copy link

Using your library at work and decided to poke around :)

Figured fixing some TODOs is a nice way to start contributing.

I've adjusted the variable types to more accurately reflect the value they were assigned.
There is some breaking changes where I've adjusted the types on public variables.

I've also added some early returns and null checks which could change behavior. Feel free to let me know if any of them don't make sense or are in the wrong place.

- `text_sizes` is assigned in constructor so doesn't need null assignment
- `tex_buf` is also assigned in constructor
- `bind_group` has null check in `getBindGroup()`
- added `| null` to `bind_group` to accurately reflect typing
Breaking Change:
- changed return type of `getShader()`

- `indexBuffer` can be made readonly and type kept as it's assigned in constructor
- added `| null` to `shader`
- adjusts typing to reflect assigned types
- doesn't change the initial values of any of the variables
- adds `| null` where `null` was assigned
- adds `null` checks
^ would want opinion in review if position of these checks makes sense
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.

1 participant