A
arktype3w ago
Bert

Modeling string template type

I have a type
type T = {
foo: '' | `/${string}`
}
type T = {
foo: '' | `/${string}`
}
which I have modelled with arkType as
const v = type({
foo: '"" | /^\\/.*$/',
})
const v = type({
foo: '"" | /^\\/.*$/',
})
Which seems like the same thing. But out infer type of foo is just string. Just wondering if there is a way to model '' | `/${string}` that will give me that as an infer/out type?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?