microsoft / microsoft/TypeScript

Go-to-type definition does not work on aliases to tuple types

Open
#63,762 0 comments 0 reactions 0 assignees View on GitHub
Bug Domain: LS: Symbol Navigation
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

```ts
export type SpanMapping = [
virtualStart: number,
virtualLength: number,
originalStart: number,
originalLength: number,
kind: SpanMapKind,
features?: SpanMapFeature,
];
export let mapping: SpanMapping;
mapping/**/;
```

If you request *go to type definition* at `/**/`, you will get no result.

The same is not true if `SpanMapping` is aliased to an anonymous object type.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the provided TypeScript example and request go-to-type-definition at the marked position. Compare the result for the tuple alias with the anonymous object alias. Done means the tuple alias returns a type-definition result like the object alias.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.