You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue with unsafety in our parseQualifiedName where existing callers just cast around.
Means that we have to undo the "feature" where you can allow typeof this.#private.
Do we... want typeof to work on #privates?
Doesn't work on declaration emit.
Shouldn't ever work outside the class - a private name is always unique and scoped to the current class. Would become ambiguous in another context.
When we did typeof, there were situations where you can access something in the value space, but had no name for the type, and there was no workaround anymore.
For #private fields, you had a means to do this, you just didn't.
Well, inference from initializers, but how common is this?
Feels like it should be legal, but what would declaration emit be?
Declaration emit is already a problem with private properties.
VERY sketchy - disallowed with typeof this.somePrivate, but not Foo["somethingPrivate] - and when we emit that in a .d.ts file, it will instantiate to any.
classFoo{privatesomethingPrivate=1234;getSomethingPrivate(): Foo["somethingPrivate"]{returnthis.somethingPrivate;}}// turns intoclassFoo{privatesomethingPrivate;// oops! this returns 'any'getSomethingPrivate(): Foo["somethingPrivate"];}
Revert is uncontroversial, whether we add it back is unclear. We generally feel skeptical of whether we need it.
The text was updated successfully, but these errors were encountered:
Arrow Function and Conditional Type Parsing
#48733 (comment)
a ? (b) : c => d
a ? (b) : (c => d)
(c => d)
looks like it's going to be a type annotation, but it's not and we have to fail.a ? b : c => d
worksa ? ((b)) : c => d
worksParsing
QualifiedName
intypeof
#48640
Issue with unsafety in our
parseQualifiedName
where existing callers just cast around.Means that we have to undo the "feature" where you can allow
typeof this.#private
.Do we... want
typeof
to work on#private
s?When we did
typeof
, there were situations where you can access something in the value space, but had no name for the type, and there was no workaround anymore.#private
fields, you had a means to do this, you just didn't.Feels like it should be legal, but what would declaration emit be?
Declaration emit is already a problem with private properties.
VERY sketchy - disallowed with
typeof this.somePrivate
, but notFoo["somethingPrivate]
- and when we emit that in a.d.ts
file, it will instantiate toany
.Revert is uncontroversial, whether we add it back is unclear. We generally feel skeptical of whether we need it.
The text was updated successfully, but these errors were encountered: