* 动态设置 options 选项值
(
newOptions: Partial<Pick<Options, ComplexOptions | PlainOptions>>
)
| 346 | * 动态设置 options 选项值 |
| 347 | */ |
| 348 | setOptions( |
| 349 | newOptions: Partial<Pick<Options, ComplexOptions | PlainOptions>> |
| 350 | ): void { |
| 351 | if (!this.isRunningSupported || !isPlainObject(newOptions)) return |
| 352 | |
| 353 | for (const property in newOptions) { |
| 354 | if (Object.hasOwnProperty.call(newOptions, property)) { |
| 355 | if (plainOptions.indexOf(property as never) !== -1) { |
| 356 | this.updatePlainOptions( |
| 357 | property as PlainOptions, |
| 358 | newOptions[property as PlainOptions] |
| 359 | ) |
| 360 | } else if (complexOptions.indexOf(property as never) !== -1) { |
| 361 | this.updateComplexOptions( |
| 362 | property as ComplexOptions, |
| 363 | newOptions[property as ComplexOptions] |
| 364 | ) |
| 365 | } |
| 366 | } |
| 367 | } |
| 368 | } |
| 369 | } |
nothing calls this directly
no test coverage detected