mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-28 00:17:14 +02:00
test: strengthen internal types (#7488)
This commit is contained in:
parent
d50fe3b670
commit
cd21a31005
15 changed files with 67 additions and 55 deletions
|
@ -83,11 +83,11 @@ import TOCInline from '@theme/TOCInline';
|
|||
The `toc` global is just a list of heading items:
|
||||
|
||||
```ts
|
||||
declare const toc: Array<{
|
||||
declare const toc: {
|
||||
value: string;
|
||||
id: string;
|
||||
level: number;
|
||||
}>;
|
||||
}[];
|
||||
```
|
||||
|
||||
Note that the `toc` global is a flat array, so you can easily cut out unwanted nodes or insert extra nodes, and create a new TOC tree.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue