UNPKG

alinea

Version:
19 lines (18 loc) 855 B
import { Field } from 'alinea/core/Field'; import { type Section, type SectionData, type SectionDefinition } from 'alinea/core/Section'; import { Type, type } from 'alinea/core/Type'; export declare class TabsSection implements SectionData { types: Array<Type>; view: string; definition: SectionDefinition; fields: Record<string, Field>; sections: Array<Section>; constructor(types: Array<Type>); } type Cast<From, To> = From extends To ? From : never; type FoldIntoIntersection<T extends readonly {}[], Acc extends {} = {}> = T extends readonly [infer H, ...infer HS] ? FoldIntoIntersection<Cast<HS, readonly {}[]>, Acc & H> : Acc; /** Create tabs */ export declare function tabs<const Types extends Array<Type>>(...types: Types): FoldIntoIntersection<Types>; /** Create a tab */ export declare const tab: typeof type; export {};