mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
chore(v2): Fix more linter warnings (#4450)
This commit is contained in:
parent
3422f80a9a
commit
83d043ecb3
27 changed files with 116 additions and 85 deletions
|
@ -78,7 +78,7 @@ function normalizeCategoryShorthand(
|
|||
function assertItem<K extends string>(
|
||||
item: Record<string, unknown>,
|
||||
keys: K[],
|
||||
): asserts item is Record<K, any> {
|
||||
): asserts item is Record<K, never> {
|
||||
const unknownKeys = Object.keys(item).filter(
|
||||
// @ts-expect-error: key is always string
|
||||
(key) => !keys.includes(key as string) && key !== 'type',
|
||||
|
@ -272,9 +272,7 @@ export function collectSidebarsDocIds(
|
|||
});
|
||||
}
|
||||
|
||||
export function createSidebarsUtils(
|
||||
sidebars: Sidebars,
|
||||
): Record<string, Function> {
|
||||
export function createSidebarsUtils(sidebars: Sidebars) {
|
||||
const sidebarNameToDocIds = collectSidebarsDocIds(sidebars);
|
||||
|
||||
function getFirstDocIdOfFirstSidebar(): string | undefined {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue