forked from facebook/docusaurus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
138 lines (117 loc) · 3.62 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable import/no-duplicates */
/* eslint-disable camelcase */
declare module '@theme/BlogSidebar' {
export type BlogSidebarItem = {title: string; permalink: string};
export type BlogSidebar = {
title: string;
items: BlogSidebarItem[];
};
export type Props = {
readonly sidebar: BlogSidebar;
};
const BlogSidebar: (props: Props) => JSX.Element;
export default BlogSidebar;
}
declare module '@theme/BlogPostPage' {
import type {TOCItem} from '@docusaurus/types';
import type {BlogSidebar} from '@theme/BlogSidebar';
export type FrontMatter = {
readonly title: string;
readonly author?: string;
readonly image?: string;
readonly tags?: readonly string[];
readonly keywords?: readonly string[];
readonly author_url?: string;
readonly authorURL?: string;
readonly author_title?: string;
readonly authorTitle?: string;
readonly author_image_url?: string;
readonly authorImageURL?: string;
readonly hide_table_of_contents?: boolean;
};
export type Metadata = {
readonly title: string;
readonly date: string;
readonly formattedDate: string;
readonly permalink: string;
readonly description?: string;
readonly editUrl?: string;
readonly readingTime?: number;
readonly truncated?: string;
readonly nextItem?: {readonly title: string; readonly permalink: string};
readonly prevItem?: {readonly title: string; readonly permalink: string};
readonly tags: readonly {
readonly label: string;
readonly permalink: string;
}[];
};
export type Content = {
readonly frontMatter: FrontMatter;
readonly metadata: Metadata;
readonly toc: readonly TOCItem[];
(): JSX.Element;
};
export type Props = {
readonly sidebar: BlogSidebar;
readonly content: Content;
};
const BlogPostPage: (props: Props) => JSX.Element;
export default BlogPostPage;
}
declare module '@theme/BlogListPage' {
import type {Content} from '@theme/BlogPostPage';
import type {BlogSidebar} from '@theme/BlogSidebar';
export type Item = {
readonly content: () => JSX.Element;
};
export type Metadata = {
readonly blogTitle: string;
readonly blogDescription: string;
readonly nextPage?: string;
readonly page: number;
readonly permalink: string;
readonly postsPerPage: number;
readonly previousPage?: string;
readonly totalCount: number;
readonly totalPages: number;
};
export type Props = {
readonly sidebar: BlogSidebar;
readonly metadata: Metadata;
readonly items: readonly {readonly content: Content}[];
};
const BlogListPage: (props: Props) => JSX.Element;
export default BlogListPage;
}
declare module '@theme/BlogTagsListPage' {
import type {BlogSidebar} from '@theme/BlogSidebar';
export type Tag = {
permalink: string;
name: string;
count: number;
allTagsPath: string;
slug: string;
};
export type Props = {
readonly sidebar: BlogSidebar;
readonly tags: Readonly<Record<string, Tag>>;
};
const BlogTagsListPage: (props: Props) => JSX.Element;
export default BlogTagsListPage;
}
declare module '@theme/BlogTagsPostsPage' {
import type {BlogSidebar} from '@theme/BlogSidebar';
import type {Tag} from '@theme/BlogTagsListPage';
import type {Content} from '@theme/BlogPostPage';
export type Props = {
readonly sidebar: BlogSidebar;
readonly metadata: Tag;
readonly items: readonly {readonly content: Content}[];
};
}