Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
elevatebart committed Sep 8, 2023
1 parent 8a24675 commit 870ffd7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ export default defineHandler(async function setupPropHandler(

const definitionPath = getTypeDefinitionFromIdentifier(astPath, typeName, opt)
// use the same process to exact info
if (definitionPath && bt.isTSTypeLiteral(definitionPath.node)) {
if (
definitionPath &&
(bt.isTSTypeLiteral(definitionPath.node) ||
bt.isTSInterfaceBody(definitionPath.node))
) {
getPropsFromLiteralType(documentation, definitionPath)
}
} else if (bt.isTSQualifiedName(typeParamsPath.node.typeName)) {
Expand Down

0 comments on commit 870ffd7

Please sign in to comment.