Skip to main content

SelfDTO

@webda/models


Type Alias: SelfDTO<T>

SelfDTO<T> = T extends bigint ? string : T extends infer U[] ? SelfDTO<U>[] : T extends Map<string, infer MV> ? Record<string, SelfDTO<MV>> : T extends Set<infer US> ? SelfDTO<US>[] : T extends RegExp ? string : T extends object ? { [K in Extract<FilterOutAttributes2<T, Function>, string>]: T[K] extends bigint ? string : T[K] extends (infer U)[] ? SelfDTO<(...)>[] : (...)[(...)] extends Map<(...), (...)> ? Record<(...), (...)> : (...) extends (...) ? (...) : (...) } : T

Defined in: packages/models/src/types.ts:91

Deep DTO representation of objects, converting properties recursively and respecting toDTO() if available. If toDTO() is present, its return type is used directly without further recursion.

Type Parameters​

T​

T