Skip to content

Commit

Permalink
fix: missing return type
Browse files Browse the repository at this point in the history
  • Loading branch information
sntran authored Apr 29, 2024
1 parent ad00bc7 commit 8436668
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
DocumentHandlers, ElementHandlers,
DocumentHandlers,
ElementHandlers,
HTMLRewriter as BaseHTMLRewriter,
} from "npm:[email protected]";

Expand All @@ -14,7 +15,7 @@ export class HTMLRewriter {
* @param {DocumentHandlers} handlers
* @returns {this}
*/
onDocument(handlers: DocumentHandlers) {
onDocument(handlers: DocumentHandlers): this {
this.#documentHandlers.push(handlers);
return this;
}
Expand All @@ -25,7 +26,7 @@ export class HTMLRewriter {
* @param {ElementHandlers} handlers
* @returns {this}
*/
on(selector: string, handlers: ElementHandlers) {
on(selector: string, handlers: ElementHandlers): this {
this.#elementHandlers.push([selector, handlers]);
return this;
}
Expand All @@ -35,7 +36,7 @@ export class HTMLRewriter {
* @param {Response} response
* @returns {Response}
*/
transform(response: Response) {
transform(response: Response): Response {
const body = response.body;
if (!body) {
return response;
Expand Down

0 comments on commit 8436668

Please sign in to comment.