You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(much more errors but I guess you get what's the issue)
I can solve it two ways, either by removing the Cli reference (so, I don't require the file), or by removing the //<reference path at the top of the file.
I didn't have this problem in TS 1.0.
Weird thing, I have this issue only here, even if in some other files I do the same, I don't get the error there and I'm not able to understand why it works there while here it fails.
But I just figured it out while writing this issue. It is because of the path used to load my Cli module, I used require('./../../shared/app/Cli'); while I should have used require('./Cli'); and because of this somehow the compiler tried to perform the reference twice because it thought it was another file. Well, I didn't have this issue in TS 1.0, I don't know if it's on purpose, anyway my issue is solved now, just wanted to give you a feedback.
Keep up the good work, looking forward for TS 2.0!
The text was updated successfully, but these errors were encountered:
@Vadorequest I could not piece together a repro form your description above. just including defLoader.d.ts from Sails and Cli does not seem to do the trick. can you share more details.
i think this is the same issue as #1039. If you start with relative paths, the compiler will not attempt to resolve them to absolute path, that means that you can have the same file with multiple different path, and then it will be included multiple times. i have listed a few workarounds in #1039.
Hi.
I have updated my typescript (
npm install typescript -g
) recently and now I have an issue with some multiple references to the same file.It worked fine under TS 1.0.
shared/app/Sails.ts:
Because Cli also imports the same defLoader.d.ts, I get the following errors:
(much more errors but I guess you get what's the issue)
I can solve it two ways, either by removing the Cli reference (so, I don't
require
the file), or by removing the//<reference path
at the top of the file.I didn't have this problem in TS 1.0.
Weird thing, I have this issue only here, even if in some other files I do the same, I don't get the error there and I'm not able to understand why it works there while here it fails.
But I just figured it out while writing this issue. It is because of the path used to load my Cli module, I used
require('./../../shared/app/Cli');
while I should have usedrequire('./Cli');
and because of this somehow the compiler tried to perform the reference twice because it thought it was another file. Well, I didn't have this issue in TS 1.0, I don't know if it's on purpose, anyway my issue is solved now, just wanted to give you a feedback.Keep up the good work, looking forward for TS 2.0!
The text was updated successfully, but these errors were encountered: