(
obj: {[id: Id]: Value},
id: Id,
getDefaultValue: () => Value,
)
| 89 | }; |
| 90 | |
| 91 | const objEnsure = <Value>( |
| 92 | obj: {[id: Id]: Value}, |
| 93 | id: Id, |
| 94 | getDefaultValue: () => Value, |
| 95 | ): Value => { |
| 96 | if (obj[id] == undefined) { |
| 97 | obj[id] = getDefaultValue(); |
| 98 | } |
| 99 | return obj[id] as Value; |
| 100 | }; |
| 101 | |
| 102 | const docObjMatch = ( |
| 103 | docObjOrParent: {[id: Id]: any}, |
no outgoing calls
no test coverage detected
searching dependent graphs…