I wonder how this code written in JavaScript
const stuff = useCallback(() => {
function first() {
return "firstStaff";
}
function major() {
return "majorStaff";
}
major.first = first;
return major;
})();
Can be written with correct types in TypeScript, so it has the right hints for stuff()
and stuff.first()