UNPKG

@bitrix24/b24ui-nuxt

Version:

Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE

19 lines (18 loc) 520 B
export interface ModelModifiers { nullable?: boolean; number?: boolean; optional?: boolean; trim?: boolean; lazy?: boolean; } export type ApplyModifiers<T, M extends ModelModifiers = ModelModifiers> = _Number<_Optional<_Nullable<T, M>, M>, M>; type _Nullable<T, M> = M extends { nullable: true; } ? T | null : T; type _Optional<T, M> = M extends { optional: true; } ? T | undefined : T; type _Number<T, M> = M extends { number: true; } ? T extends string ? T | number : T : T; export {};