Bobakanoosh
Explore posts from serversAarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
For posterity, finally got everything working, last part was having a default value in the event the parsing failed. For that I just needed to use the type
type.Any<TData>['inferOut']
Thanks again!59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
Yeah those are some good "basics" that I think would go a long way. Appreciate all your work!!
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
And TBH that stuff will also happen if you're e.g. writing a Zod schema and wanting to pass it to your own generics based on constraintsYeah I ran into this when making some frontend form/form input components
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
It's definetly come leaps and bounds from even a few weeks ago, I see the progress 🙂
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
was weeks ago
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
I might've searched the discord tbh i forget
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
I keep wanting to use this lib because I see the potential but it can be demotivating losing hours to it :/ (as it usually goes with complex types though)
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
Admittedly would be nice, I know you're super busy though 😂
even if they're not docs but moreso "recipes". Common use-cases that cover mechanics of the library that aren't super evident/easy to think of at first. e.g. type for
password
and confirmPassword
. I figured that out eventually but a recipe of having one field rely on another of it's own type would've helped a ton.59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
hmmmm okay trying that 1 sec there's a few other things I haven't included in my snippets thus far lol
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
Here's the full snippet:
error is:
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
Yeah I end up passing
$.export().config
to the class's super
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
so you can use the schema within the group
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
thats what
.export()
is for right?59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
Right yeah but now it takes a string and outputs an object
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
which I kinda get since it's not taking an object any more
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
This does break the
type.Any<TData>
from the other example though 🙁59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
very nice ok
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
ahhh self referencing kinda
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Using scope with morphs
Explanations are helpful so you're all good lol
59 replies
Aarktype
•Created by Bobakanoosh on 11/15/2024 in #questions
Passing an exported scope to a function (Type 'string' is not assignable to type 'never')
I was refactoring some code while doing this and realizing I actually have the wrong type, gonna make a new thread for this other issue..
16 replies