Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/doom/src/plugins/auto-sidebar/walk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ export interface DoomSidebarItem extends SidebarItem {
}

export type DoomSidebar =
| DoomSidebarGroup
| DoomSidebarItem
| SidebarDivider
| SidebarSectionHeader
DoomSidebarGroup | DoomSidebarItem | SidebarDivider | SidebarSectionHeader

export interface DoomSidebarGroup extends Omit<SidebarGroup, 'items'> {
items: DoomSidebar[]
Expand Down
3 changes: 1 addition & 2 deletions packages/doom/src/runtime/components/K8sAPI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ export const K8sAPI = ({

if ('x-kubernetes-group-version-kind' in schema) {
const def = schema['x-kubernetes-group-version-kind'] as
| K8sAPIDefinition
| K8sAPIDefinition[]
K8sAPIDefinition | K8sAPIDefinition[]
return Array.isArray(def) ? def[0] : def
}

Expand Down
11 changes: 3 additions & 8 deletions packages/doom/src/runtime/components/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ export const isSingleFile = (
*/
export function findItemByRoutePath(
items: (
| SidebarItem
| SidebarSectionHeader
| NormalizedSidebarGroup
| SidebarDivider
SidebarItem | SidebarSectionHeader | NormalizedSidebarGroup | SidebarDivider
)[],
routePath: string,
): (SidebarItem | NormalizedSidebarGroup)[] {
Expand Down Expand Up @@ -85,8 +82,7 @@ export function findItemByRoutePath(
}

const matchRoutePathItem = items[matchRoutePathItemIndex] as
| SidebarItem
| NormalizedSidebarGroup
SidebarItem | NormalizedSidebarGroup

const isArray = (i: unknown): i is Array<unknown> =>
Array.isArray(i) && i.length >= 1
Expand All @@ -109,8 +105,7 @@ export function findItemByRoutePath(
result.splice(matchRoutePathItemIndex, 1)
}
const res = result.filter((item) => !isSidebarDivider(item)) as (
| SidebarItem
| NormalizedSidebarGroup
SidebarItem | NormalizedSidebarGroup
)[]

return res
Expand Down
3 changes: 1 addition & 2 deletions packages/doom/src/shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ export interface K8sTypeList<T extends K8sTypeMeta> extends K8sTypeMeta {
}

export type UnversionedVersion =
| typeof UNVERSIONED
| `${typeof UNVERSIONED}-${string}`
typeof UNVERSIONED | `${typeof UNVERSIONED}-${string}`
3 changes: 1 addition & 2 deletions packages/export/src/export-pdf-core/utils/setOutlines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { PDFHexString } from 'pdf-lib'
// --- Outline ---

type PDFOutlineTo =
| number
| [pageIndex: number, xPercentage: number, yPercentage: number]
number | [pageIndex: number, xPercentage: number, yPercentage: number]

export interface PDFOutlineItem {
title: string
Expand Down
Loading
Loading