Skip to content

v0.29.1

Choose a tag to compare

@github-actions github-actions released this 26 Dec 06:32
· 203 commits to main since this release
2d07dd6

Patch Changes

  • 7df7aee: Fix Brand type to support hierarchical/stacked brands

    Previously, stacking brands resulted in never because intersecting { [brand]: 'A' } with { [brand]: 'B' } collapsed the property to never.

    Now brands use a nested object structure { [brand]: { [K in T]: true } } (following Effect-TS pattern), allowing brand stacking to work correctly:

    type AbsolutePath = string & Brand<"AbsolutePath">;
    type ProjectDir = AbsolutePath & Brand<"ProjectDir">;
    
    const projectDir = "/home/project" as ProjectDir;
    const abs: AbsolutePath = projectDir; // Works - child assignable to parent