DateToString
DateToString<
T> =TextendsDate?string:Textends infer U[] ?DateToString<U>[] :TextendsRecord<string,unknown> ?{ [K in keyof T]: DateToString<T[K]> }:T
Defined in: packages/db/src/json.ts:68
Type-level utility that converts Date fields to string in a type.
Maps { createdAt: Date; title: string } to
{ createdAt: string; title: string } so the return type of
toJSON(row) accurately reflects the runtime shape.
Type Parameters
Section titled “Type Parameters”T