In TS i started to use pattern like tihs:

const create_api = (options) => {
    const dosth = () => xy const domore = () => { dosth(); dosth(); }
    return { dosth, domore }

}

It allows to reuse things from scope easily minimizing passing arguments.

And from my point of view its fine if the compiler can infer the return type 
without having me to think about it or write it. But maybe its a very special 
case.

I agree about mystic error messages in some cases.

In the TS case it allows async initalization classes don't.

Reply via email to