I'm writing a function with refernece to callback functions. However I cannot seem to access its properties.
const example = (
callback: (...args: unknown[]) => unknown
): void => ({
name: callback.name // <- errors
// ...
})
My issue is, typescript doesn't like me accessing the funciton properties.
name: callback.name
// ts(2339): Property 'name' does not exist on type '(...args: any[]) => any'
What would be the correct way of accessing the function name (or other Function properties for that matter)?
Typescript version: "
ˆ3.9.7" (latest as to the day of this post)