-
Notifications
You must be signed in to change notification settings - Fork 595
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
[api-extractor] handle merged (augmented) symbols properly #1045
Comments
Could you provide a branch with a simple project that repros this error? I have never encountered transient symbols in any of our projects at work, so I'm pretty unfamiliar with this feature (or why anyone would want it heheh). Thanks! |
@octogonz I'll do that shortly... Augmenting types is quite common, especially with plugin architecture and type lookup maps. Anyway, the transient type is created by TS and represents the merged (union) type of the original type and the augmentation type... |
Does the transient type have the same signature for every source file that references it? Or does it create a special extended signature that is only visible in the source file that contains the merged declaration? In the latter case, API Extractor would need to somehow distinguish the two different |
Closing, since this is a duplicate of #1709 which has made more progress. |
When declaration merging is applied on an imported type a new symbol is created (merged symbol).
This symbol contains
SymbolFlags.Transient
which does not have a matchingAstSymbol
which in turn throws an errorThe type itself is fine, it is just a merged type and the transient check should not stop it, for this particular situation.
This is my current workaround, i'm not sure it covers all scenarios:
The text was updated successfully, but these errors were encountered: