Technically this is not one of the "TypeScript rules" but a problem with JavaScript. It is yet not syntactically possible to use @decorator for functions, but in its essence, a function decorator is just a higher-order function that wraps around the decorated function.
The closest thing that you can do is defining a function wrapper
function foo() {
return "asd";
}
const wrap = (func: () => void) => {
const wrapped = () => {
console.log("wrapped");
return func();
}
return wrapped;
}
console.log(wrap(foo)());