As of Typescript v5.6 the built-in iterators like Set.prototype.values() is much more strict and the types now return T | undefined for values.next().value, see release post.
This applies to only built-in types until we upgrade to Typescript, at which point it might have more failures.
For now in #2790 we just use values.next().value! in places where the logic is strictly expecting a non-null value.
We should clean this up.
As of Typescript
v5.6the built-in iterators likeSet.prototype.values()is much more strict and the types now returnT | undefinedforvalues.next().value, see release post.This applies to only built-in types until we upgrade to Typescript, at which point it might have more failures.
For now in #2790 we just use
values.next().value!in places where the logic is strictly expecting a non-null value.We should clean this up.