-
Notifications
You must be signed in to change notification settings - Fork 598
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] Emit /// <reference lib="" /> in rolled up .d.ts #922
Comments
@southpolesteve I'd be happy to help you get this working. Would you be able to provide a Git branch with an isolated example that repros the issue? That would help me to investigate it more easily. If this is a time-sensitive need, feel free to contact me at work. |
@pgonzal Here is my WIP branch https://github.com/Azure/azure-cosmos-js/tree/api-extractor
|
Thanks @southpolesteve for providing the repro branch. We're currently using the 3.0.x version of the TypeScript compiler. It seems that the compiler itself does not emit the The second challenge is that TypeChecker.getSymbolAtLocation() seems to skip over the It occurred to me that maybe API Extractor should provide a config setting that allows you to manually inject text into your rollup file. This could provide a fairly general workaround when people encounter edge cases like this. |
@iclanton Could we set up a 3.1 flavor of rush-stack-compiler? |
I noticed that we're already doing something similar with typeReferenceDirectives (for The compiler API provides a similar libReferenceDirectives array, so if there isn't a more elegant solution, we can just collect them in the same way: interface SourceFile extends Declaration {
typeReferenceDirectives: ReadonlyArray<FileReference>;
libReferenceDirectives: ReadonlyArray<FileReference>;
. . .
} |
@southpolesteve This fix was published as API Extractor 6.1.6 |
This is looking good. Thanks! |
I'm attempting to adopt API extractor in https://github.com/Azure/azure-cosmos-js and ran into a blocker.
/// <reference lib="" />
directives are missing from the rolled up .d.ts file. We had switched to these recently instead of specifyinglib
in tsconfig.json to make things more pleasant for TS consumers.Relevant Azure Cosmos issue Azure/azure-cosmos-js#161
Relevant TS issue microsoft/TypeScript#26497
The text was updated successfully, but these errors were encountered: