Whenever I come back to writing JavaScript after a long break, I always forget how to correctly return objects from lambda expressions, and end up with this:
() => {
foo: "bar";
baz: "qux";
}
Thankfully TypeScript warns me it's a ()=>void function instead of whatever was expected in the context. I scratch my head for a while and then remember: () => ({
foo: "bar",
baz: "qux"
});