Micha
Aarktype
•Created by Micha on 2/5/2025 in #questions
Why is the generic expecting 3 options, although there is only one generic prop?
Got it - subscribed to the issue - thaaanks 🙂
5 replies
Aarktype
•Created by Micha on 2/4/2025 in #questions
scope() how to bypass circular reference error?
I think I go for now with this one:
14 replies
Aarktype
•Created by Micha on 2/4/2025 in #questions
scope() how to bypass circular reference error?
Sound like you should consider writing your own compiler to get beyond such problems 😛
14 replies
Aarktype
•Created by Micha on 2/4/2025 in #questions
scope() how to bypass circular reference error?
Do you think this is solvable, and should I create a GitHub issue, or is it a general limitation?
14 replies
Aarktype
•Created by Micha on 2/4/2025 in #questions
scope() how to bypass circular reference error?
This is the working equivalent in typescript:
14 replies
Aarktype
•Created by Micha on 2/4/2025 in #questions
How to integrate generics with extend that need to access a type in scope?
I have to say I'm quite impressed with how far I have already come without a painful workaround (I say only cyclic references + zod... 😉 ). You did here definitely an outstanding job 👍
15 replies
Aarktype
•Created by Micha on 2/4/2025 in #questions
How to integrate generics with extend that need to access a type in scope?
awesome - that is what I need. My goal was to group the types logically to keep it a bit tidy 🙂
15 replies
Aarktype
•Created by Micha on 2/4/2025 in #questions
How to integrate generics with extend that need to access a type in scope?
The way you phrase it, sounds like it's a limitation?
15 replies
Aarktype
•Created by Micha on 2/4/2025 in #questions
How to integrate generics with extend that need to access a type in scope?
I've updated it, but I'm still getting an error that metadata is unresolvable
Type '"metadata"' is not assignable to type '"'metadata' is unresolvable "'.ts(2322)
:
If I'm renaming "metadata" to "t" the error changes to Type '"t"' is not assignable to type '"true"'.ts(2322)
15 replies
Aarktype
•Created by Micha on 2/4/2025 in #questions
How to integrate generics with extend that need to access a type in scope?
oh, somehow I missed this part in the docs, although I have read over this today probably already 10 times 😬
15 replies
Aarktype
•Created by Micha on 2/4/2025 in #questions
How to create the Typescript type from a generic?
All right - thanks a lot for your help! 🙂
7 replies
Aarktype
•Created by Micha on 2/4/2025 in #questions
How to create the Typescript type from a generic?
ah ok, good to know, so this seems working:
Is it also possible to write that shorter? Something like this? (In this case he seems not liking the function call)
7 replies
Aarktype
•Created by Micha on 2/3/2025 in #questions
What is the arktype 2 syntax for inferring classes with a private constructor?
Awesome - you're a live saver! ❤️
6 replies
Aarktype
•Created by Micha on 2/3/2025 in #questions
What is the arktype 2 syntax for inferring classes with a private constructor?
Like this?
6 replies
Aarktype
•Created by Micha on 2/3/2025 in #questions
How to create an array of type.instanceOf?
Great, thanks a lot ❤️
4 replies
Aarktype
•Created by Micha on 2/3/2025 in #questions
What is the arktype 2 syntax for inferring classes with a private constructor?
Seems I'm getting a bit closer:
But this throws a conversion error:
If I cast it to unknown
then I get again back to the initial error:
6 replies
Aarktype
•Created by Micha on 2/3/2025 in #questions
How to create an array of type.instanceOf?
This is working 🎉:
Maybe it's worth adding this example also to the docs? https://arktype.io/docs/objects#instanceof @ArkDavid
4 replies