Get the last event of a specific type
(
type: T,
)
| 62 | |
| 63 | /** Get the last event of a specific type */ |
| 64 | getLastEvent<T extends PrintModeEvent['type']>( |
| 65 | type: T, |
| 66 | ): Extract<PrintModeEvent, { type: T }> | undefined { |
| 67 | const filtered = this.getEventsByType(type) |
| 68 | return filtered[filtered.length - 1] |
| 69 | } |
| 70 | |
| 71 | /** Get all text content concatenated */ |
| 72 | getFullText(): string { |
no test coverage detected