Arduano
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
you can see it here
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
yeah
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
like here
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
invalid casting
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
if
satisfies
doesn't catch it then type annotated variables definitely don't either62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
as
is more concise but equally type safe for now62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
I attempted it at some point though
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
yeah that would make sense, though it's not really feasible in my context
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
is there some specific property of the type where it decies to simplify/narrow, which I can force it to avoid?
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
oh, wdym?
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
hmm
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
in what way? unless you mean manual casting
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
yeah basically
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
doesn't type error here
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
not perfect but cleaner
62 replies
TTCTheo's Typesafe Cult
•Created by Arduano on 6/12/2024 in #questions
Typescript generic field selection assumes type incorrectly
wait I just noticed, you can replace
as
with satisfies
, that's neat62 replies