[typescript] Are strongly-typed functions as parameters possible in TypeScript?