Get a field from a wrapped object. Return 0 if the field is missing or empty, or opt instance is None.
interface A {x?: number;}const aFull: A = {x: 4};opt(aFull).propOrZero('x'); // 4const aEmpty: A = {};opt(aEmpty).propOrZero('x'); // 0
Get a field from a wrapped object. Return 0 if the field is missing or empty, or opt instance is None.