Skip to content

Typescript LS is preferring .js to @types .d.ts when loading types #9427

Closed
@weswigham

Description

@weswigham

TypeScript Version: nightly (2.0.0-dev.201xxxxx)

Code
npm install --save-dev gulp
npm install --save-dev @types/gulp

import gulp = require("gulp");

Expected behavior:

Right click -> Go to definition on gulp -> Opens @types/gulp/index.d.ts

Actual behavior:

Right click -> Go to definition on gulp -> Opens gulp/index.js

Using the imported gulp also makes it obvious that all the types are being loaded from the located .js and not the @types .d.ts. This causes serious editor usability issues as your included type definitions are overridden by the required js!

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions