* Remove annotations from the page. * * Without options, removes all annotations (except Widget annotations). * With type filter, removes only annotations of the specified type. * * @param options - Optional filter by annotation type * * @example * ```typescript * // Remov
(options?: RemoveAnnotationsOptions)
| 2283 | * ``` |
| 2284 | */ |
| 2285 | removeAnnotations(options?: RemoveAnnotationsOptions): void { |
| 2286 | const annotations = this.getAnnotations(); |
| 2287 | |
| 2288 | let toRemove = annotations; |
| 2289 | |
| 2290 | if (options?.type) { |
| 2291 | toRemove = annotations.filter(a => a.type === options.type); |
| 2292 | } |
| 2293 | |
| 2294 | for (const annotation of toRemove) { |
| 2295 | this.removeAnnotation(annotation); |
| 2296 | } |
| 2297 | } |
| 2298 | |
| 2299 | /** |
| 2300 | * Flatten all annotations on this page into static content. |
nothing calls this directly
no test coverage detected