Conversation
|
(also: note: #422 was found by enabling this setting) |
I'd love that, but they didn't start over, and the rest of the type system doesn't work nicely with the option, requiring expressions like I don't think anybody really likes such an expression, and we had a feature request to accept We should definitely support strictOptionalProperties once it becomes the default. Before that happens, we're better off avoiding the over-engineering. |
|
@timostamm that's very easy, all we need to do is change the type to reflect that a literal undefined is acceptable and your concern is addressed. e90f7f1 :) If you would like the same to be done for any others, please just say so. The fact is that codebases that have this strictness option on need to do this already today. Ones that don't, won't need to anyway. So, if nothing else, this is a QoL improvement with no downsides. |
To quote from the TypeScript team lead:
This configuration brings a pretty critical element to the type-soundness (critical because it drastically changes the behavior of operations that check for keys). SameValueZero checks remain unchanged, anyway, so there's basically no downside to having this rule enabled. The implementation from Anders provides some more context, as well.
Thankfully, this codebase was already pretty close to the mark, with only a few little minor things to update to increase strictness. Once this PR merges, I'd like to do to same with the connect-es repo.