message: feat(website): stricten types in getHeadings
diff: @@ -6,12 +6,16 @@ export interface Heading {
  }
  export function getHeadings(children: React.ReactNode): Heading[] {
  - return children
  - .filter((child) => child.props?.mdxType === "h2")
  + return React.Children.toArray(children)
  + .filter(
  + (child) => React.isValidElement(child) && child.props?.mdxType === "h2",
  + )
  .map((heading) => {
  + if (React.isValidElement(heading)) {
  return {
  id: heading.props?.id,
  text: heading.props?.children,
  }
  + }
  })
  }
  