Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
msdsk31825y@12bitfloat
technically it was perfectly fine even with proper type checking; just an optional parameter passed as an object property. I'm afraid nothing could really save me from my hubris. -
@msdsk TypeScript actually supports that which is quite cool.
function foobar(param1: string, opts?: {yes?: bool, addtional?: string})
which is then used normally
foobar("param", {yes: true}) -
msdsk31825y@12bitfloat
True, though for this project it would need to be a bit smarter than that - it's a back end project glued from files with `module.exports={(...)}` with a custom inheritance mechanism.
Related Rants
Today I have spent 2 hours trying o figure out why my code wasn't executing at all.
It was a typo.
"assFields" instead of "addFields".
I need sleep.
rant
send help
bug
typo
i'm tired
js