What is the syntax to write a typescript interface using double arrow function es6?
Example JS:
const myFunction => (param1) => (param2) => {
...code
}
Example: TS:
const myFunc = (param1: number) => (param2: number) => {
return param1 + param2
};
this interface is incorrect
interface myInterface {
myFunc: (param1: number) => (param2: number) => number
}
the error is: Parsing error: ';' expected
so why? and what is the correct syntax?