Function
applyDefaultValue
(o: option_.Option<A>, defaultValue: () => A)
Source from the content-addressed store, hash-verified
| 2039 | }) |
| 2040 | |
| 2041 | const applyDefaultValue = <A>(o: option_.Option<A>, defaultValue: () => A) => |
| 2042 | option_.match(o, { |
| 2043 | onNone: () => option_.some(defaultValue()), |
| 2044 | onSome: (value) => option_.some(value === undefined ? defaultValue() : value) |
| 2045 | }) |
| 2046 | |
| 2047 | const pruneUndefined = (ast: AST.AST): AST.AST | undefined => |
| 2048 | AST.pruneUndefined(ast, pruneUndefined, (ast) => { |
Tested by
no test coverage detected