How can a typescript interface be written using the double arrow function es6 syntax?
JavaScript Example:
const myFunction => (param1) => (param2) => {
...code
}
TypeScript Example:
const myFunc = (param1: number) => (param2: number) => {
return param1 + param2
};
This interface appears to have an error
interface myInterface {
myFunc: (param1: number) => (param2: number) => number
}
The error message received is: Parsing error: ';' expected
Why does this error occur and what is the correct syntax to use?