gvergnaud / hotscript

A library of composable functions for the type-level! Transform your TypeScript types in any way you want using functions you already know.
3.38k stars 57 forks source link

[Bug] AllPaths incorrect on const objects #82

Closed Maggi64 closed 1 year ago

Maggi64 commented 1 year ago

The paths for the object { a: 1, b: 2, c: [{ d: 3 }, { e: 4 }] } as const are incorrect. But it works correctly for { a: 1, b: 2, c: [{ d: 3 }, { e: 4 }] }.

Reproduction: https://stackblitz.com/edit/typescript-wrimqa?file=index.ts

Thanks for looking into this 👍

gvergnaud commented 1 year ago

Thanks for opening this issue, this is fixed on the main branch

gvergnaud commented 1 year ago

Publish as v1.0.11

Maggi64 commented 1 year ago

Thank you very much for the quick fix 👍