TizzySaurus
Aarktype
•Created by PIat on 9/17/2024 in #questions
Dynamic type based on another value
Not even that. Just use a discriminated union, like you would with raw TS.
8 replies
Aarktype
•Created by errata on 9/10/2024 in #questions
template literal/backtick string types e.g. type T = `type-${string}`
Although the inferred type would just be
string
14 replies
Aarktype
•Created by errata on 9/10/2024 in #questions
template literal/backtick string types e.g. type T = `type-${string}`
or whatever
14 replies
Aarktype
•Created by errata on 9/10/2024 in #questions
template literal/backtick string types e.g. type T = `type-${string}`
You'd need to use a morph/narrow for now (probably a narrow)
14 replies
Aarktype
•Created by errata on 9/10/2024 in #questions
template literal/backtick string types e.g. type T = `type-${string}`
Ig this is what you're referring to: https://github.com/arktypeio/arktype/issues/491
14 replies
Aarktype
•Created by SynthLuvr on 9/4/2024 in #questions
Record with number as key?
It's not possible to have numbers as a key in JS
6 replies
Aarktype
•Created by PIat on 8/30/2024 in #questions
Default number
Where
t
in this case is your queryType
133 replies
Aarktype
•Created by PIat on 8/30/2024 in #questions
Default number
It's not clear to me what exactly you're after here, but maybe
t["infer"]
or t["tOut"]
is what you're after?133 replies
Aarktype
•Created by PIat on 8/23/2024 in #questions
Accept number in string type
(That json being
formType.json
)187 replies
Aarktype
•Created by PIat on 8/23/2024 in #questions
Accept number in string type
Sort of. You could look at the internal schema structure
187 replies
Aarktype
•Created by PIat on 8/23/2024 in #questions
Accept number in string type
You just need a way of determining what
keepAsString
should be, which from the sounds of it you know so isn't an issue187 replies
Aarktype
•Created by PIat on 8/23/2024 in #questions
Accept number in string type
@PIat To finally answer your question, this seems to work:
187 replies
Aarktype
•Created by PIat on 8/23/2024 in #questions
Accept number in string type
As in, I'm too busy to work on it atm anyway
187 replies
Aarktype
•Created by PIat on 8/23/2024 in #questions
Accept number in string type
Yeah, my time is better spent elsewhere atm anyway tbf
187 replies
Aarktype
•Created by PIat on 8/23/2024 in #questions
Accept number in string type
Yeah, it would've happened anyway when I continued working on https://github.com/arktypeio/arktype/issues/729 😅
187 replies
Aarktype
•Created by PIat on 8/23/2024 in #questions
Accept number in string type
(Sorry @PIat, I totally took over this channel 😅)
187 replies