@ng-doc/builder / Function

getDefinedInParent

Resolves the parent node (TypeReference or TypeAliasDeclaration name) of a property that is defined in a type alias declaration.

Specifically, this resolves type alias declarations that resolve to types that are "object-like", including:

  • IntersectionTypes,
  • TypeLiterals, and
  • TypeReferences (which resolve to IntersectionTypes or TypeLiterals)

For other types (e.g. UnionType) it just defaults back to the existing rendering.

See Also

  • libs/builder/helpers/typescript/member/get-member-parent.ts

Presentation

function getDefinedInParent(
  property: Node<Node>,
  currentNode: Node<Node>,
): Node<Node> | undefined;

Returns

Node<Node> | undefined

Parameters

NameTypeDescription
property
Node<Node>
currentNode
Node<Node>

@note Similar to getMemberParent but handling type aliases declarations rather than member inheritance.