test: strengthen internal types (#7488)

This commit is contained in:
Joshua Chen 2022-05-25 15:38:44 +08:00 committed by GitHub
parent d50fe3b670
commit cd21a31005
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 67 additions and 55 deletions

View file

@ -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.