Costa.
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
🧐
32 replies
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
However, how can i force func to be in
SomeInterface
?32 replies
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
smth like this right?
32 replies
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
32 replies
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
And dispatch some state actions
32 replies
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
The wrapper has the function of logging into some file
32 replies
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
Im not thinking about forcing bar into foo, its more like calling bar or foo get the return types calling a wrapper
32 replies
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
@ mattpocock 🙏
32 replies
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
I thought about getting the keys from SomeInterface but its does not work...
32 replies
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
I think its a really tricky thing
32 replies
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
Hey! thank you for helping me . I think i'm not being precise... Lets say something like:
This will not work, cuz
wrapper
only accepts foo"
. it shoudl accept all functions from SomeInteface
and it can not be hardcoded. The interface have more than 30 methods...32 replies
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
I was thinking about some generics approach
32 replies
TTCTheo's Typesafe Cult
•Created by Costa. on 4/10/2023 in #questions
Use function as a parameter and preserve types
Kinda yes, but it could be any function from SomeInterface
32 replies
TTCTheo's Typesafe Cult
•Created by Will on 2/23/2023 in #questions
Does anyone know of a way to programmatically lift classNames into typescript intellisense?
maybe i'm wrong but i dont think that's possible 🥸
82 replies