Fursum
Fursum
TTCTheo's Typesafe Cult
Created by Fursum on 4/30/2023 in #questions
How do I coerce this function to accept multiple types then conditionally change the output?
thanks!
9 replies
TTCTheo's Typesafe Cult
Created by Fursum on 4/30/2023 in #questions
How do I coerce this function to accept multiple types then conditionally change the output?
though i should be more familiar with extends uses, will definitely be useful
9 replies
TTCTheo's Typesafe Cult
Created by Fursum on 4/30/2023 in #questions
How do I coerce this function to accept multiple types then conditionally change the output?
seems like a better solution for my use case
9 replies
TTCTheo's Typesafe Cult
Created by Fursum on 4/30/2023 in #questions
How do I coerce this function to accept multiple types then conditionally change the output?
No description
9 replies
TTCTheo's Typesafe Cult
Created by Fursum on 4/30/2023 in #questions
How do I coerce this function to accept multiple types then conditionally change the output?
oh you cast it
9 replies
TTCTheo's Typesafe Cult
Created by Fursum on 4/30/2023 in #questions
How do I coerce this function to accept multiple types then conditionally change the output?
9 replies
TTCTheo's Typesafe Cult
Created by Fursum on 3/8/2023 in #questions
Good way to handle redirect on unauthorized request response
redirect function uses useRouter under useUnauthorized, also resets the cookies with useCookie
4 replies
TTCTheo's Typesafe Cult
Created by Fursum on 1/2/2023 in #questions
Non strict string literal types
string literal union autocomplete
yeah... https://github.com/microsoft/TypeScript/issues/29729
8 replies
TTCTheo's Typesafe Cult
Created by Fursum on 1/2/2023 in #questions
Non strict string literal types
the utility type is a cool idea, thanks!
8 replies
TTCTheo's Typesafe Cult
Created by Fursum on 1/2/2023 in #questions
Non strict string literal types
Using uppercase String seems to be working, though I am not sure if it is completely safe to do so in my situation with React stuff. It is only defined as a type, so I am assuming it wouldn't do some coersion in the background prayge
type SuggestedStrings = "cat" | "dog" | String;
type SuggestedStrings = "cat" | "dog" | String;
8 replies