-
Notifications
You must be signed in to change notification settings - Fork 122
Package typings file cannot contain tripleslash references #9
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
Comments
I added /// to my main.ts and now I get a bunch of error TS2300: Duplicate identifier . This may not be your issue but there must be a way to get the library and the app which uses it to play together. |
Seems like if Typescript in the library was not in the equation then everything would play. I have my library project "Linked" to my app project (NPM Link) while I am building it. Maybe is I just packaged the Library and installed the dist package with no Typescript things would play. That's alot of steps to take each time I update the package and then want to test it in my app. |
@jbeckton — I have just released v0.5.0 with a possible fix that references Can you please verify if that fixes your problem? Thanks in advance! |
This fixes the issue, thanks. After updating to 0.4.0 yesterday, I was going to create an issue and a pull request today, but you already addressed the issue. |
@pauljeter — Thank you for taking the time to report your findings. Much appreciated! I will close this issue for now. If anyone feels it needs to be re-opened, feel free to do so. Thanks! |
@jvandemo That did the trick! I used your tsconfig and that solved my issues. I was hoping for a simple solution because I have a lot of time into this already. Thanks for your help. |
@jvandemo Ok I spoke too soon, the problem I have now is that only the main ts file is getting compiled. I thought the ts compiler could traverse the other ts files via the import statments and compile them too but that's not the case for me. I do not want to have to add all of my ts files to the tsconfig files array. |
@jbeckton — You will have to specify all your individual TypeScript files in the There is a feature request in the TypeScript repo where it is said that TypeScript 2.0 should support globs (e.g. If you are using Atom editor then using |
Interesting about Atom, I am using VS Code though. I guess I'll have to wait for TS 2. In the mean time I can make it work from my original set up and Gulp hack to add and remove the /// reference path before and after compilation respectively. I guess my set up is an edge case and not very friendly to TS, but I need to develop a library and the app that uses it at the same time so I guess a hack is in order for now. |
@jbeckton — Totally understandable. Feel free to keep us posted in case you find a user-friendly solution that works for you. I'm sure others (including myself) would be interested in hearing your findings. Thanks! |
So I got my custom library wired up but I have an issue with the Reference Path.. When i compile the Typescript in the app that imports the library I get...
error TS2654: Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition.
if I delete the /// from the main Typescript file (import entry point) the error goes away but I cannot compile the Typescript in my library anymore.
How can I resolve this and keep both sides happy?
The text was updated successfully, but these errors were encountered: