News for hackers. Stuff that matters.
Re:How I Program in 2024 by fendy3002 on Monday August 05, 2024 @02:23AM (#41158582)
have you tried typescript? the code above will make the function declaration become like this:

function foo (): {data: MyCustomObject, message: string}

so foo().data and foo().message is a valid object, while foo().bar will throw build error

There are no comments on this comment yet.