-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
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".FixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
const DATA_END_INDEX = 2;
enum OptimizedDataIndex {
start,
data,
end
}
interface OptimizedData {
0: number;
1: any[];
2: number;
}
var data: OptimizedData;
var start = OptimizedData[OptimizedDataIndex.start];
var end = OptimizedData[DATA_END_INDEX];
// expecting no error. `start` and `end` should be numbers.
This should also apply to something like tuples directly written as [TypeA, TypeB, ...]
.
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".FixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript