* Unsets the input value for the specified property and setter. * See `set()` for more info. * @param {IContextProp } prop * @param {function(T):void} setter * @template T
(prop, setter)
| 143 | * @template T |
| 144 | */ |
| 145 | remove(prop, setter) { |
| 146 | devAssert(setter); |
| 147 | |
| 148 | const {key} = prop; |
| 149 | const inputsByKey = this.inputsByKey_; |
| 150 | const inputs = inputsByKey?.get(key); |
| 151 | if (inputs) { |
| 152 | devAssert(inputsByKey); |
| 153 | |
| 154 | const index = inputs.setters.indexOf(setter); |
| 155 | if (index != -1) { |
| 156 | inputs.setters.splice(index, 1); |
| 157 | inputs.values.splice(index, 1); |
| 158 | if (inputs.setters.length == 0) { |
| 159 | inputsByKey.delete(key); |
| 160 | } |
| 161 | deepScan(this.contextNode_, scan, prop); |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * Whether this node has inputs for the specified property. |
no test coverage detected