Skip to content

Commit

Permalink
chore: re-enable any on event handlers
Browse files Browse the repository at this point in the history
Not everyone will understand the usage of `never` here, so we can
continue using `any` instead and ignore the linter.
  • Loading branch information
43081j committed Jan 7, 2025
1 parent 5c5f63e commit 9c185ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/parse5-html-rewriting-stream/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,6 @@ export interface RewritingStream {
* @param event Name of the event
* @param handler Event handler
*/
on(event: string, handler: (...args: never[]) => void): this;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
on(event: string, handler: (...args: any[]) => void): this;
}
3 changes: 2 additions & 1 deletion packages/parse5-parser-stream/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@ export interface ParserStream<T extends TreeAdapterTypeMap = DefaultTreeAdapterM
* @param event Name of the event
* @param handler Event handler
*/
on(event: string, handler: (...args: never[]) => void): this;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
on(event: string, handler: (...args: any[]) => void): this;
}
3 changes: 2 additions & 1 deletion packages/parse5-sax-parser/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,5 +291,6 @@ export interface SAXParser {
* @param event Name of the event
* @param handler Event handler
*/
on(event: string, handler: (...args: never[]) => void): this;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
on(event: string, handler: (...args: any[]) => void): this;
}

0 comments on commit 9c185ab

Please sign in to comment.