(key: Identifier)
| 268 | resumeSnapshot(name: string) { |
| 269 | const snapshot = this.get<ConfigSnapshots>("configSnapshots")[name]; |
| 270 | const resume = (key: Identifier) => { |
| 271 | let val = snapshot[key]; |
| 272 | const rule = this.getRule(key); |
| 273 | let invalid: boolean = |
| 274 | rule.minimalVersion != undefined && |
| 275 | isLower(snapshot["version"], rule.minimalVersion as string); |
| 276 | //config的版本小于这项rule的最低版本,则需要更新为最新的预定义值 |
| 277 | invalid = invalid || !this.checkValid(key, val); |
| 278 | if (invalid) { |
| 279 | return; |
| 280 | } |
| 281 | if (key == "layoutType") { |
| 282 | this.set(key, val, true, false); //必须要禁止preset才能 |
| 283 | } else { |
| 284 | this.set(key, val); |
| 285 | } |
| 286 | }; |
| 287 | const keys: Identifier[] = Object.keys(snapshot) as Identifier[]; |
| 288 | for (const key of keys) { |
| 289 | if (key == "layoutType") { |
nothing calls this directly
no test coverage detected