(key: string, fn: any)
| 349 | } |
| 350 | |
| 351 | delWait(key: string, fn: any) { |
| 352 | const waits = this.waits.get(key); |
| 353 | if (!waits) { |
| 354 | return; |
| 355 | } |
| 356 | let i = waits.length; |
| 357 | while (i--) { |
| 358 | if (waits[i].resolve === fn) { |
| 359 | waits.splice(i, 1); |
| 360 | } |
| 361 | } |
| 362 | if (waits.length < 1) { |
| 363 | this.waits.delete(key); |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | getPreference(): IPublicModelPreference { |
| 368 | return this.preference; |