Skip to content

The typescript language service in VS doesn't consider tsconfig's types entry #9740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tragetaschen opened this issue Jul 14, 2016 · 1 comment
Labels
Bug A bug in TypeScript @types Relates to working with .d.ts files (declaration/definition files) from DefinitelyTyped Visual Studio Integration with Visual Studio

Comments

@Tragetaschen
Copy link

TypeScript Version: 2.0.0-beta / "2.0.0.0" in Help -> About

Code

"devDependencies": {
  "@types/jquery": "1.10.27",
  "typescript": "2.0.0"
}
{
    "compilerOptions": {
        "types": ["jquery"]
    }
}
var a: JQuery;

Running tsc on the command line works as expected. When I remove for example the "jquery" entry from the types array in tsconfig.json I get the appropriate error for a.

Expected behavior:
Opening the ts file in Visual Studio 2015 with 2.0.0-beta installed should show no errors.

Actual behavior:
VS complains about the type JQuery not known. When I manually add a

/// <reference types="jquery" />

VS stops complaining.

@mhegazy
Copy link
Contributor

mhegazy commented Jul 19, 2016

typeRoots does not seem to be honored either.

@mhegazy mhegazy added the Bug A bug in TypeScript label Jul 19, 2016
@mhegazy mhegazy added this to the TypeScript 2.0.1 milestone Jul 19, 2016
@mhegazy mhegazy added the @types Relates to working with .d.ts files (declaration/definition files) from DefinitelyTyped label Jul 19, 2016
@mhegazy mhegazy added the Visual Studio Integration with Visual Studio label Jul 19, 2016
@yuit yuit closed this as completed Aug 4, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript @types Relates to working with .d.ts files (declaration/definition files) from DefinitelyTyped Visual Studio Integration with Visual Studio
Projects
None yet
Development

No branches or pull requests

3 participants