Skip to content

Go to definition: not working with type-only imports #36004

Closed
@ajafff

Description

@ajafff

TypeScript Version: 3.8.0-dev.20200104

Search Terms:

Code

// @filename: a.ts
export class C {}

// @filename: b.ts
import type { C } from "./a";

export function f(p: C/*1*/) {}

Expected behavior:

Go to definition at /*1*/ works.

Actual behavior:

Go to definition only works if I use a regular import.

Related Issues: Introduced by @andrewbranch in #35200

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions