You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect TypeDoc to document the constructor signatures contained in the variable declaration.
Actual Behavior
TypeDoc does not document these constructor signatures:
I believe this is because typeLiteralConverter does not check for constructor signatures (shown in the AST - see it here - as ConstructSignature nodes).
Oddly enough, sometimes the constructors are documented correctly. Consider the following code:
This is likely because the symbol associated with the variable declaration is also associated with the interface declaration (see the associated AST here). When TypeDoc extracts the declaration from the symbol in convertVariable function, it happens to get the interface declaration, which is why the ts.isVariableDeclaration check fails and we eventually end up using constructorConverter.
As soon as we add a second constructure signature:
Search terms
variable, signature, constructor, type literal
Expected Behavior
Consider the following code:
I would expect TypeDoc to document the constructor signatures contained in the variable declaration.
Actual Behavior
TypeDoc does not document these constructor signatures:
I believe this is because
typeLiteralConverter
does not check for constructor signatures (shown in the AST - see it here - asConstructSignature
nodes).Oddly enough, sometimes the constructors are documented correctly. Consider the following code:
for which TypeDoc renders the following:
This is likely because the symbol associated with the variable declaration is also associated with the interface declaration (see the associated AST here). When TypeDoc extracts the declaration from the symbol in
convertVariable
function, it happens to get the interface declaration, which is why thets.isVariableDeclaration
check fails and we eventually end up usingconstructorConverter
.As soon as we add a second constructure signature:
we revert back to the
typeLiteralConverter
and the constructor signatures are not rendered:Steps to reproduce the bug
npm ci
npm run docs
docs
directory.Environment
The text was updated successfully, but these errors were encountered: