xref: /expo/docs/types/common.ts (revision 4c360b75)
1export type PageMetadata = {
2  title: string;
3  sourceCodeUrl?: string;
4  maxHeadingDepth?: number;
5  hideTOC?: boolean;
6  headings?: {
7    title?: string;
8    level?: number;
9    type?: string;
10    _processed?: boolean; // internal HeadingManager property
11  }[];
12};
13
14/**
15 * Utility type. Extracts `T` type from `T[]` array.
16 */
17export type ElementType<T extends any[]> = T extends (infer U)[] ? U : never;
18
19export type Url = {
20  pathname: string;
21};
22
23export type NavigationRoute = {
24  name: string;
25  href: string;
26  as?: string;
27  weight?: number;
28  sidebarTitle?: string;
29  children?: NavigationRoute[];
30  posts?: NavigationRoute[];
31};
32