Skip to content
All changes

Fix

TPaths stops at a Date, a Set, a function and an any field

@venizia/ardor-kernel

Changelog - 2026-10-18 ​

TPaths stops at a Date, a Set, a function and an any field ​

Bug Fix

In 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 or any field is named by its own key only. Before, createdAt.getTime, tags.size and a path under an any field 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.