import type { IfExtends } from "hry-types/src/Any/IfExtends"; import type { DetailedType } from "../../../types/DetailedType"; import type { InferDetailedType } from "../../../types/InferDetailedType"; import type { CustomEventConstraint, FullCustomEvents, ShortCustomeEvents, SimpleCustomeEventsList } from "./CustomEventConstraint"; import type { AddTagForCustomEventsDef } from "./CustomEventsTag"; export type GetShortCustomEventsDef = T extends DetailedType ? InferDetailedType : T extends null ? null : T extends undefined ? undefined : T extends SimpleCustomeEventsList ? GetShortCustomEventsDef : never; export type GetFullCustomEventsDef = GetShortCustomEventsDef | IfExtends>; export type GetCustomEventsDef = { [k in keyof T]: T[k] extends ShortCustomeEvents ? GetShortCustomEventsDef : T[k] extends FullCustomEvents ? GetShortCustomEventsDef | IfExtends>> : never; };