Skip to content
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

Nested files in VS 2015 show false TypeScript compilation errors in IDE #5727

Closed
rwhepburn opened this issue Nov 20, 2015 · 4 comments
Closed
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Visual Studio Integration with Visual Studio

Comments

@rwhepburn
Copy link

We just upgraded to from VS 2013 Ultimate with TypeScript 1.6 to VS 2015 Enterprise with TypeScript 1.6 and now we are seeing an issue with nested files in our solution where the IDE is reporting errors despite the project building without errors.

We use nested files (using Mads Kristensen's File Nesting VS extension v2.2.31) to nest our test specs under the related .ts file to test. For example:

Test.ts
L Test.spec.ts

When Test.spec.ts is nested under Test.ts and you open it in the VS IDE, errors are shown as follows:

2015-11-19 22_25_32-tsnestingissue - microsoft visual studio

Un-nesting the file resolves the problem and the TypeScript tooling is able to resolve the describe(...) function and errors are no longer displayed in the IDE.

A repro project can be found here:
https://github.com/rwhepburn/TsNestingIssue

Thanks,
Richard

@billti
Copy link
Member

billti commented Nov 20, 2015

I have no ideas how that extension performs the nesting, but if it is restructuring the way items are represented in the project somehow, then it likely breaks how TypeScript infers the project contents.

@madskristensen Any insight you can provide here?

@paulvanbrenk
Copy link
Contributor

Nothing in the project file immediately stands out as problematic, I would expect this to just work. I don't think this a problem with the 'nesting extension'.

@paulvanbrenk paulvanbrenk added Bug A bug in TypeScript Visual Studio Integration with Visual Studio labels Nov 23, 2015
@paulvanbrenk paulvanbrenk added this to the TypeScript 1.8 milestone Nov 23, 2015
@paulvanbrenk paulvanbrenk self-assigned this Nov 23, 2015
@dziedrius
Copy link

Same problem here on VS2015 Professional, it was working fine in VS2013.

@paulvanbrenk
Copy link
Contributor

Found the issue, we assumed TypeScript files would never have children... have a fix which I'll check in today, which may make it into 1.8.

@paulvanbrenk paulvanbrenk added the Fixed A PR has been merged for this issue label Feb 10, 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 Fixed A PR has been merged for this issue Visual Studio Integration with Visual Studio
Projects
None yet
Development

No branches or pull requests

5 participants