docs/node_modules/@docusaurus/plugin-content-docs/lib/sidebars.js
/**
 * Check that item contains only allowed keys.
 */
Check that item contains only allowed keys.
Check that item contains only allowed keys .
function assertItem(item, keys) {
    const unknownKeys = Object.keys(item).filter(
    (key) => !keys.includes(key) && key !== 'type');
    if (unknownKeys.length) {
        throw new Error(`Unknown sidebar item keys: ${unknownKeys}. Item: ${JSON.stringify(item)}`);
    }
}
function assertItem ( item , keys ) { const unknownKeys = Object . keys ( item ) . filter ( ( key ) => ! keys . includes ( key ) && key !== 'type' ) ; if ( unknownKeys . length ) { throw new Error ( ` ${ unknownKeys } ${ JSON . stringify ( item ) } ` ) ; } }
Check that item contains only allowed keys.
Check that item contains only allowed keys .
// @ts-expect-error: key is always string