When working on a function that should return an object with properties 'a' and 'b', I am defining the object first and then adding values to it later:
const result = {};
result.a = 1;
result.b = 2;
return result;
However, TypeScript is showing me the following error message:
Type '{}' is missing the following properties from type 'Output': a, b ts(2739)
I believe TypeScript should understand that I will be adding the required fields to the constant object while the function is executing.