mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
refactor: ensure all types are using index signature instead of Record (#6995)
* refactor: ensure all types are using index signature instead of Record * kick CI
This commit is contained in:
parent
e8800b9d49
commit
87592bca03
99 changed files with 339 additions and 307 deletions
|
@ -57,7 +57,7 @@ describe('processSidebars', () => {
|
|||
|
||||
async function testProcessSidebars(
|
||||
unprocessedSidebars: NormalizedSidebars,
|
||||
categoriesMetadata: Record<string, CategoryMetadataFile> = {},
|
||||
categoriesMetadata: {[filePath: string]: CategoryMetadataFile} = {},
|
||||
paramsOverrides: Partial<SidebarProcessorParams> = {},
|
||||
) {
|
||||
return processSidebars(unprocessedSidebars, categoriesMetadata, {
|
||||
|
@ -142,7 +142,6 @@ describe('processSidebars', () => {
|
|||
},
|
||||
numberPrefixParser: DefaultNumberPrefixParser,
|
||||
isCategoryIndex,
|
||||
options: params.sidebarOptions,
|
||||
});
|
||||
expect(StaticSidebarItemsGenerator).toHaveBeenCalledWith({
|
||||
defaultSidebarItemsGenerator: DefaultSidebarItemsGenerator,
|
||||
|
@ -154,7 +153,6 @@ describe('processSidebars', () => {
|
|||
},
|
||||
numberPrefixParser: DefaultNumberPrefixParser,
|
||||
isCategoryIndex,
|
||||
options: params.sidebarOptions,
|
||||
});
|
||||
expect(StaticSidebarItemsGenerator).toHaveBeenCalledWith({
|
||||
defaultSidebarItemsGenerator: DefaultSidebarItemsGenerator,
|
||||
|
@ -166,7 +164,6 @@ describe('processSidebars', () => {
|
|||
},
|
||||
numberPrefixParser: DefaultNumberPrefixParser,
|
||||
isCategoryIndex,
|
||||
options: params.sidebarOptions,
|
||||
});
|
||||
|
||||
expect(processedSidebar).toEqual({
|
||||
|
|
|
@ -680,7 +680,7 @@ describe('toNavigationLink', () => {
|
|||
return {...data, frontMatter: {}} as DocMetadataBase;
|
||||
}
|
||||
|
||||
const docsById: Record<string, DocMetadataBase> = {
|
||||
const docsById: {[docId: string]: DocMetadataBase} = {
|
||||
doc1: testDoc({
|
||||
title: 'Doc 1',
|
||||
permalink: '/doc1',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue