Theo's Typesafe CultTTC
Theo's Typesafe Cult13mo ago
16 replies
choco

Simple typescript function

It has been several hours since I have been trying to create a simple function that I know is possible to create, because I once somehow managed to do that, but not now.

I just want to create a function that takes other functions.
...callbacks
Each of those functions will be called inside, and a single value will be passed (context). Context: It is an object that takes the result of the previous callback. execution.
so like
[0]: number, [1]: {a: number}


The problem is that I cannot have a type of those results, but instead it displays as
[x:string]:any
. Again once i somehow implemented it and now i just cant. Thank you for any help
Was this page helpful?