Added methods for common patterns found in production code:
Data we know we should have in app:
const value = model.get('_page.user')!;
// following code expects value is defined
// will error in less obvious ways as unlikely to handle the cases of undefined
using getOrThrow
const value = model.getOrThrow('_page.user');
// following code will not be reached
// does not need to defensively handle undefined case
Data we may or may not have but want to cleaner code
Added methods for common patterns found in production code:
Data we know we should have in app:
using
getOrThrow
Data we may or may not have but want to cleaner code
using
getOrDefault