Conversation
packages/blob/src/index.js
Outdated
There was a problem hiding this comment.
Initially, my editor ignored the | undefined part of this type and the following one. Adding explicit strictNullChecks to the tsconfig restored it.
packages/blob/src/index.js
Outdated
There was a problem hiding this comment.
{?File} is a nullable type in JSDoc, equivalent to File | null, which isn't accurate.
There was a problem hiding this comment.
{?File}is a nullable type in JSDoc, equivalent toFile | null, which isn't accurate.
Yeah, I think you'll find a lot of examples like this in the codebase, where nullable type is used incorrectly as interchangeable with "optional" or "possibly undefined".
tsconfig.json
Outdated
There was a problem hiding this comment.
This should be enabled via strict, but I some Type | undefined types didn't seem to be handled correctly. Adding this seems to fix the issue.
I wonder if strict + noImplicitAny results in odd behavior.
fefa371 to
9d8ae89
Compare
Description
Part of #18838
Extracted from #18942
Add types to
blobpackage.Testing Instructions:
Verify type checking passes: