//#region src/common/types.d.ts type Simplify = { [K in keyof T]: T[K]; }; type Unwrap = T extends { __requirable: infer U; } ? U : T; type HasMarker = [Extract] extends [never] ? false : true; type Optional = { [K in keyof T]-?: object extends Pick ? K : never; }[keyof T]; type Marked = { [K in keyof T]-?: HasMarker extends true ? K : never; }[keyof T]; export type Strict = Simplify>]-?: Unwrap; } & { [K in Optional]?: Unwrap; } : { [K in Exclude | Marked>]-?: Unwrap; } & { [K in Optional | Marked]?: Unwrap; }>; export type Requirable = T | { __requirable: T; }; export type DateLike = Date | string; export type ExtraFields, V = unknown> = { [K in F[number]]?: V; }; export type ParseMainOptions = { maxItems?: number; parseDateFn?: (raw: string) => TDate; }; export type XmlStylesheet = { type: string; href: string; title?: string; media?: string; charset?: string; alternate?: boolean; }; export type GenerateMainXmlOptions = O & { strict?: S; stylesheets?: Array; }; export type GenerateMainXml> = (value: S extends true ? SV : LV, options?: GenerateMainXmlOptions) => string; export type GenerateMainJsonOptions = O & { strict?: S; }; export type GenerateMainJson> = (value: S extends true ? SV : LV, options?: GenerateMainJsonOptions) => unknown; //#endregion