-
-
Notifications
You must be signed in to change notification settings - Fork 734
How to import one node_modules/@types and pin the reference to it like IncludeDeclarations works #848
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
See also: Stack Overflow question |
@aciccarello it is my question too. I was asking at StackOverflow too when I saw that there is not reply from a long time |
Hi @presto41, have you find a solution to this issue. I have the same request; i.e. including types from an imported package from node_modules |
There isn't a nice solution to this yet. If you don't have too many {
"exclude": [ "**/\\@types/{foo,bar}/index.d.ts" ]
} |
ok thanks, but in my case I wanted to include types from a package that do not have published types (in @types folder) |
That should make it easier, just exclude the |
Has there been an update on this? It would be a great feature to be able to include certain paths without having to exclude all the other node modules. |
I believe you should be able to do something like this (untested, but a similar pattern worked when I was checking another issue) {
"inputFiles": [ "./src", "./node_modules/botbuilder/src" ],
"includeDeclarations": true,
"excludeExternals": true
} |
Thanks for getting back to me! I tried exactly that but it did not solve the issue. However, using the CLI to specify multiple inputFiles did work as expected: My config file currently looks like this:
I'm simply using the Provided there is nothing wrong with my |
I think that's the same issue as #1263, there's a fix but since it requires bumping the minimum node version it can't be merged until 0.18. I hope to get a lot closer to that release today/this week. Alternative workaround: add a |
TypeDoc 0.20 will now document whatever you export - if that's from your dependencies, that's fine. If not, that's fine too. If not exported, it won't be documented. |
Uh oh!
There was an error while loading. Please reload this page.
In my code is some function which return object which has of type from node_modules/@types.
I need to include this type because I need to show reference to this @type and I need to show this @type too. So I was trying those ways:
First way had been ignored. I thought at the first look that the second is working well but I observed something. I observed that the full of node_modules had been including into my documentation. But I don't need all of node_modules into my documentation. I need only this one type.
I'm so disappointed because without includeDeclarations my documentation cannot to find node_modules type but with it - is including a lot of redundant code.
Is any way to do it?
There are my typedoc configs.
First of them from point 1.:
Second from point 2:
I'm looking for a way how to include my @type but without a rest of node_modules.
The text was updated successfully, but these errors were encountered: