xref: /expo/docs/types/common.ts (revision 32f56664)
1export type PageMetadata = {
2  title?: string;
3  sourceCodeUrl?: string;
4  packageName?: string;
5  maxHeadingDepth?: number;
6  /* If the page should not show up in the Algolia Docsearch results */
7  hideFromSearch?: boolean;
8  hideTOC?: boolean;
9};
10
11/**
12 * A single header from the `remark-export-headings` plugin.
13 */
14export type RemarkHeading = {
15  id?: string;
16  depth: number;
17  title: string;
18  type: string;
19};
20
21/**
22 * Utility type. Extracts `T` type from `T[]` array.
23 */
24export type ElementType<T extends any[]> = T extends (infer U)[] ? U : never;
25
26export type Url = {
27  pathname: string;
28};
29
30export type NavigationRoute = {
31  as?: string;
32  hidden: boolean;
33  href: string;
34  name: string;
35  sidebarTitle?: string;
36  weight?: number;
37  children?: NavigationRoute[];
38  posts?: NavigationRoute[];
39};
40