@prefecthq/prefect-design
Version:
A collection of low-level Vue components.
6 lines (4 loc) • 312 B
text/typescript
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6'
export function isHeadingLevel(value: unknown): value is HeadingLevel {
return typeof value === 'number' && [1, 2, 3, 4, 5, 6].includes(value) || typeof value === 'string' && ['1', '2', '3', '4', '5', '6'].includes(value)
}