matchMenuElement()function

matchMenuElement(element: Element): boolean
ParamType
elementElement
The element to test. required
    .typestring
((props: P) => Elements
null)
required readonly
    .propsP
required readonly
    .keystring
null
required readonly
    .$$typeofsymbol
readonly
Return
boolean
true when the element should appear in the menu, false otherwise.

Match an element that should appear in the sidebar menu.

  • Generic tree elements (directories and files) always qualify.
  • For documentation elements, only kind: "module" qualifies — functions, classes, methods, properties, etc. are kept off the navigation.

Examples

matchMenuElement(element) // true