Closed zepumph closed 2 years ago
@samreid, I didn't see any type errors here, do you think we are good to close this issue?
We needed isEnumerationValue
when EnumerationValue
read:
class EnumerationValue {
name?: string; // undefined until set by RichEnumeration
toString() {
return this.name;
}
}
So I think we may still need it. But I tried deleting the body of EnumerationValue to try to reproduce the problem we saw before, and I couldn't recall the context.
I thought that name, enumeration, and sealedCache would now be enough to structurally type this unique class. I'm glad you can't reproduce the original issue. Please reopen if you have any other thoughts.
name
and enumeration
are both optional, so objects without those will match the interface. The sealedCache
is static
so it doesn't appear in the EnumerationValue
interface.
Ahh, thanks. Yes that makes perfect sense. Reverted above. Closing.
I think this may be obsolete since adding a bit more structure to EnumerationValue. I'll take a look.
From https://github.com/phetsims/chipper/issues/1106