Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Update samples to work with TypeScript strict mode (part 2) #285
base: main
Are you sure you want to change the base?
Update samples to work with TypeScript strict mode (part 2) #285
Changes from 5 commits
217e5fd
593c7d4
ab3f4e4
7cb5518
229ee58
e4fd662
12e1d0d
fad1617
06c3cc8
c1b5a89
c85c030
41d5064
bd44d27
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Since this can't actually happen I think I'd prefer
gui!
overgui?
If it's wrong it'll just throw a TypeError which is fine for a sample.
Or just
assert(gui)
.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.
Thank you for the review. I used assert because non-null assertions are discouraged in some lint settings
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.
(In response to the GitHub Actions check warning)
It would be nice to make the build warning-free. In this case it can probably be
view: undefined!,
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.
@kainino0x
I wanted to use
view: undefined!
too, but it was inferred as the never type and didn't work out. How about usingview: undefined as unknown as GPUTextureView
? Using as twice isn't intuitive, but since we can't directly cast undefined to GPUTextureView, it seems unavoidable. If there's a better suggestion, I'd love to hear it.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.
Similarly shouldn't be necessary, though I'm less certain about this since it's inside a function. OK to keep if needed.
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.
This is a complicated way to get
colorAttachments[0]
. How about storing colorAttachment0 into its own variable?