mshafir
Aarktype
•Created by mshafir on 4/9/2025 in #questions
branded types are not portable when declaration: true
Hi, I'm trying to export a branded type from a shared node package. The tsconfig has declaration: true because I want the type declarations emitted, but that seems to get me a type portability error:
just from
I know it can work if I explicitly type the return, but I don't want to give up type inference, is there an easy solution to this?
2 replies
Aarktype
•Created by mshafir on 3/12/2025 in #questions
How to combine multiple configure() calls
I noticed that if I call configure multiple times each next call wipes out the previous metadata.
Here's a test example
Using .describe() has the same results. Notice that the meta only has the alias, not the description.
Is there a way to instead have configure chain the request so it doesn't override prior metadata? I know in theory it could all happen in one configure, but in my codebase there are multiple layers so that in some cases I want to build on another type and just add some metadata to it.
6 replies