Skip to content

Why vscode jump to a .d.ts file when I command click a module #30604

Closed

Description

@vanvanj

import { Provider } from 'react-redux';

When I command click the 'react-redux' I wanna see the source code which is a .js file, but the vscode jump to a .d.ts file instead. How can I fix this?

Activity

  1. added
    javascript
    on Jul 13, 2017
  2. tnngo commented on Jul 13, 2017

    @tnngo

    JS is weakly typed

  3. vanvanj commented on Jul 14, 2017

    @vanvanj
    Author

    I want the vscode jump to a .js file when I command click the module name. I think it's not about the language is strong typed or weak typed

  4. added
    *duplicate
    upstream
    on Jul 14, 2017
  5. mjbvz commented on Jul 14, 2017

    @mjbvz
    Contributor

    Duplicate of microsoft/TypeScript#14479
    Duplicate of microsoft/TypeScript#6209

    This is currently a limitation of how the TypeScript server that powers both our JS and TS intellisense works. We use d.ts files for module intellisense in order to provide rich suggestions without having to parse or understand the JavaScript implementation. This is done both for performance reasons and to leverage TS language features when describing JavaScript APIs

    Closing as upstream

  6. hoegge commented on Jul 18, 2017

    @hoegge

    But why can't the intellisense find the way to the implementation in the originating .ts file instead of just the .d.ts file?

  7. locked and limited conversation to collaborators on Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*duplicatejavascriptupstream

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions