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?
1 Reply
That's a weird one because the
You may be able to work around it by adding
Brand
type in @ark/util
is...
- fully exported
- serializable (it's just a string literal)
You may be able to work around it by adding
@ark/util
as an explicit dependency (it already is transitively).
@Andarist any ideas why this would happen here?