-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Open
Labels
Effort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Experimentation NeededSomeone needs to try this out to see what happensSomeone needs to try this out to see what happensHelp WantedYou can do thisYou can do thisRevisitAn issue worth coming back toAn issue worth coming back toSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
Type queries combined with indexed access types currently produce a parse tree that is surprising in its behavior.
One would think that typeof Foo['bar']
would be parsed as typeof (Foo['bar'])
, which would really be something like typeof Foo.bar
.
That's not the case. It's actually parsed as (typeof Foo)['bar']
.
Conveniently, it seems that semantically (when type-checking) these are identical, but it seems strange for syntactic consumers. Do we believe this is currently working as intended?
Metadata
Metadata
Assignees
Labels
Effort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Experimentation NeededSomeone needs to try this out to see what happensSomeone needs to try this out to see what happensHelp WantedYou can do thisYou can do thisRevisitAn issue worth coming back toAn issue worth coming back toSuggestionAn idea for TypeScriptAn idea for TypeScript