Mike McCall
11/14/2021, 2:45 PMLambdaFunction
as a function type. It has to be a Function
from sst. However I cannot use sst's Function
as a type in another construct because it is banned. Am I missing something?
Don't use `Function` as a type. The `Function` type accepts any function-like value.
It provides no type safety when calling the function, which can be a common source of bugs.
It also accepts things like class declarations, which will throw at runtime as they will not be called with `new`.
If you are expecting the function to accept certain arguments, you should explicitly define the function shape
thdxr
11/14/2021, 2:46 PMthdxr
11/14/2021, 2:46 PMthdxr
11/14/2021, 2:46 PMMike McCall
11/14/2021, 2:48 PMMike McCall
11/14/2021, 2:49 PMthdxr
11/14/2021, 3:55 PMthdxr
11/14/2021, 3:55 PM