Kaizen
Browse modulesRulesrules/sharedFunctions

Function: createPathBuilder()

function createPathBuilder<T>(): PathProxy<T>;

Defined in: shared/rules/types/paths.ts:75

Create a proxy object mirroring the shape of T. Accessing nested properties returns the accumulated dot-path string. Use $_ to traverse array elements (maps to * at runtime).

Type Parameters

Type Parameter
T

Returns

PathProxy<T>

Example

const paths = createPathBuilder<PricingContext>();
paths.user.is_resident;       // "user.is_resident"
paths.line_items.$_.module;   // "line_items.*.module"

On this page