I want to declare a function while setting the value of a function pointer.
A TypeScript equivalent:
let fp: () => void;
fp = () => {
console.log("Hello from inline function declaration!");
};
I've tried looking online but I can't seem to find anything that is related to what I'm looking for. I don't think this is possible but if it was it would be very helpful for a project I'm working on. I know this may be a stupid question but I really would like to know the answer.