Closed ChuckJonas closed 3 years ago
It might be helpful to mock up some code for a base scenario to make sure we provide a solid developer experience:
Base Scenario:
One thing that worries me is it might be awkward it will be to work with the derived types (passing queried objects into functions, combining updated results with queried results). ReturnType<>
will probably be heavily used.
Example:
function calculateAnnualRevenue(acc: ?): ?{
}
const accs = AccountService.query().select('id','name').limit(200);
for(acc of accs){
calculateAnnualRevenue(acc);
}
//update all accounts
//display the retrieved account info + the new fields
Prototype
Other things to consider: