mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-16 02:27:21 +02:00
refactor(content-docs): deduplicate types, JSDoc for some APIs (#7027)
* refactor(content-docs): deduplicate types, JSDoc for some APIs * little refactor
This commit is contained in:
parent
b842197ac6
commit
2bcac29cd4
38 changed files with 715 additions and 521 deletions
|
@ -8,11 +8,11 @@
|
|||
import _ from 'lodash';
|
||||
import type {Sidebars} from './sidebars/types';
|
||||
import {createSidebarsUtils} from './sidebars/utils';
|
||||
import type {LoadedVersion} from './types';
|
||||
import type {
|
||||
CategoryGeneratedIndexMetadata,
|
||||
DocMetadata,
|
||||
LoadedVersion,
|
||||
} from './types';
|
||||
} from '@docusaurus/plugin-content-docs';
|
||||
import type {
|
||||
GlobalVersion,
|
||||
GlobalSidebar,
|
||||
|
@ -65,9 +65,9 @@ function toGlobalSidebars(
|
|||
export function toGlobalDataVersion(version: LoadedVersion): GlobalVersion {
|
||||
return {
|
||||
name: version.versionName,
|
||||
label: version.versionLabel,
|
||||
label: version.label,
|
||||
isLast: version.isLast,
|
||||
path: version.versionPath,
|
||||
path: version.path,
|
||||
mainDocId: version.mainDocId,
|
||||
docs: version.docs
|
||||
.map(toGlobalDataDoc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue