-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Unexpected /// <reference types="angular" />
in .d.ts
files
#11039
Comments
/// <reference types="angular" />
/// <reference types="angular" />
in .d.ts
files
what is you symlink issue? can we fix it? |
The issue is that we have
|
this sounds like the same underlying issue in #9552. we should be fixing this in the next release. |
But the original question remains. Why is there |
ah sorry @vladima looked into it. and the issue is the compiler automatically loads all @types packages in the containing directories. so it did include |
Hmm. I thought I tried it and it did not work for me. Will try again.
|
@mhevery Hi, I have the same issue with update to typescript 2.0.3. Did you find a solution to fix this ? |
Did On Thu, Sep 22, 2016 at 1:20 PM Julien Bier [email protected]
|
No it didn't. Issue seems to be in @types/angular-mocks npm package. |
TypeScript Version: 2.0.2
Code
I am sorry I don't have a smaller repro case. :-(
(https://github.com/mhevery/angular/tree/ts-issue-11039)
The issue is that
d.ts
file contains/// <reference types="angular" />
and I don't know why.Angular had incorrectly included
@types/angularjs
. The PR changes it to@types/angular
The only place where@types/angular
should be used is inmodules/@angular/upgrade/tsconfig-build.json
as that is the only folder which imports from@types/angular
The change (
@types/angularjs
=>@types/angular
) now sprinkles/// <reference types="angular" />
in somed.ts
files where it did not before. An example for it isdist/packages-dist/core/src/type.d.ts
.Steps to repro:
git clone https://github.com/mhevery/angular.git
ts-issue-11039
:git checkout ts-issue-11039
npm i
./build.sh
dist/packages-dist/core/src/type.d.ts
has/// <reference types="angular" />
Why?rm -rf dist/packages-dist/core
node --max-old-space-size=3000 dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/core/tsconfig-build.json
(We have a custom TSC main to deal with our sim link issue, which is why$(npm bin)/tsc -p modules/@angular/core/tsconfig-build.json
) does not work. Notice that after rebuild thedist/packages-dist/core/src/type.d.ts
has/// <reference types="angular" />
yet there is no reference to@types/angular
in themodules/@angular/core
folderNOTE: There are many more files which have this issue (not just the core)`
The text was updated successfully, but these errors were encountered: