79599580

Date: 2025-04-30 05:17:14
Score: 0.5
Natty:
Report link

It seems like you can do a named function expression, which may get you what you are after.

type Func = (foo:string) => void

// named function expression
const myFunction:Func = function myFunction(foo) {
  console.log(foo)
}

This was tested in TypeScript Playground back to version 3.3.33333.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Christopher Meyers