Type 'Sidebar' is not assignable to type 'Sidebar | undefined'.
Type 'SidebarMulti' is not assignable to type 'Sidebar | undefined'.
Type 'SidebarMulti' is missing the following properties from type 'SidebarItem[]': length, pop, push, concat, and 28 more.ts(2322)
To Reproduce
sidebar: generateSidebar({}),
Expected behavior
generateSidebar() should not be able to return undefined
Screenshots
Desktop (please complete the following information):
OS: Win 10
Browser: N/A
IDE: VS Code
Additional context
Everything still works but TypeScript complains. It's annoying and makes the inexperienced user think they're doing something wrong.
Changing SidebarMultiItem.base to be required fixes it, idk TypeScript though so might be nonsense.
Describe the bug
To Reproduce
Expected behavior
generateSidebar()
should not be able to return undefinedScreenshots
Desktop (please complete the following information):
Additional context
Everything still works but TypeScript complains. It's annoying and makes the inexperienced user think they're doing something wrong.
Changing
SidebarMultiItem.base
to be required fixes it, idk TypeScript though so might be nonsense.