Changelog - 2026-10-18
TPaths stops at a Date, a Set, a function and an any field
Bug FixIn one line. TPaths treated every object type as a tree, so the members of a value type passed as paths. It now stops at those values.
typescript
import type { TPaths } from '@venizia/ardor';
interface IOrder {
createdAt: Date;
tags: Set<string>;
customer: { name: string };
}
export const accepted: Array<TPaths<IOrder>> = ['createdAt', 'tags', 'customer', 'customer.name'];What changed
- A leaf stops the path. A
Date,RegExp,Set,Map,Promise, function oranyfield is named by its own key only. Before,createdAt.getTime,tags.sizeand a path under ananyfield type-checked. - Nothing else changes. Arrays still stop the walk, nested objects are still walked, and the default depth is still 10.
Who is affected
- A caller that used a path into one of those values. It no longer compiles. Use the key of the field.
- Everyone else. No action needed.