-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Stopped working after upgrade to 2.0.0 #72
Comments
Hi Tareq, We'll probably need more information to be of any help. Is there an error? What is the behaviour that's happening and what were you expecting? I don't see a |
Hi @nonara , Thanks for answering. |
@tareqdayya what typescript version are you using? |
Hi @danielpza |
@tareqdayya Hmm. Would you mind providing an example of the before and after on one of the transforms without paths configured in v1.1.14? |
Ok. I had a look at the old code, and I think I see what's going on. @tareqdayya Try adding this to your tsconfig, and it should work with v2:
We updated the logic to rely on TS Compiler API, which has improved many issues. It's also updated to support TS v4, which in a few versions will deprecate the old API, causing v1.x of this plugin to break. I would recommend upgrading to v2. Still interested in seeing an example of what you were transforming. I'm not entirely sure I understand your use case of transforming without paths. |
@nonara Yup :) That fixes it. What i'm doing is using absolute imports relative to baseUrl. For example: |
@tareqdayya Ok. Thanks! That makes sense. Glad it's all set! |
Ok, so this went sour pretty quickly 😂
You won't believe how this happens, brace yourselves. I've got this code:
If we switch the order of UserType and Document, the error happens and the application crashes. How? Why? Where? When? I have no idea. |
Interesting. We can keep it in this issue. Can you see if you can create a minimal |
@nonara Yeah absolutely. |
Seeing a similar issue. I have a .d.ts file that only exports types and another file that does: export * from "path/to/types"; This seems to now compile instead of being erased. Should be simple enough to reproduce, but let me know if you can't. I could put together a tiny repo to reproduce it. |
@osyrisrblx That's due to a change in TypeScript 3.9. See: Export * is always retained Beginning with v2.0 of this plugin, we standardized behaviour to match TypeScript's. |
@nonara - FYI I'm getting the same or similar issue as @tareqdayya gets above when using I have confirmed that it is as a result of this plugin as Dump from any file change when using
|
Ok, so here's the update on this one for everyone. This problem is linked to an issue in the TypeScript API that has been around for awhile. Namely, type emit elision breaks when we modify either Unfortunately, this seems to cause an issue if there are any diagnostics attached to the former node, which makes sense. This leaves us with the main options of:
Both of these would be time consuming and undesirable, in the sense that it's best not to use internal TS methods for a public project like this, as they're subject to breaking changes without notice. Fortunately, however, the TS team added my reported issue to the milestone for TS 4.2.0 I'm assuming that means that it's in the roster to be fixed, but I noticed that it hasn't gotten a In the mean time, if you're experiencing this issue, I'd recommend using the latest available v1 of Thanks everyone for sharing your reports! |
Hi all. This should be sorted now! I was able to steal some time to dig into the compiler a bit more. Post-mortem is here if anyone is interested: #76 The short version is, you won't have to wait on a new TS version. It should be compatible with all TS versions. Anyone who was experiencing issues, I'd greatly appreciate it if you let me know if this fixes it for you! |
Just a heads up - I recommend upgrading to the latest v2.1.0. We implemented proper type elision. No more workarounds. If interested, more detail can be found in #81 |
Hi, this plugin stopped working after upgrading from 1.1.14 to 2.0.1.
Here's my config.
I use it with ttsc (ttypescript).
The text was updated successfully, but these errors were encountered: