From 99ac1b45ac8aa50de138bddeb7f1e78a4ceeaa1d Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Wed, 29 Oct 2014 20:18:28 -0500 Subject: [PATCH] Add backwards compat aliases in htmlparser2, and Parser constructor's (optional) 'options' argument --- htmlparser2/htmlparser2.d.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/htmlparser2/htmlparser2.d.ts b/htmlparser2/htmlparser2.d.ts index 77fb0b9838..ccf36d5126 100644 --- a/htmlparser2/htmlparser2.d.ts +++ b/htmlparser2/htmlparser2.d.ts @@ -61,18 +61,26 @@ declare module "htmlparser2" { } export class Parser { - constructor(handler: Handler); + constructor(handler: Handler, options?: Options); /*** * Parses a chunk of data and calls the corresponding callbacks. * @param input */ write(input:string):void; + /*** + * alias for backwards compat + */ + parseChunk(input:string):void; /*** * Parses the end of the buffer and clears the stack, calls onend. */ end():void; + /*** + * alias for backwards compat + */ + done():void; /*** @@ -86,4 +94,4 @@ declare module "htmlparser2" { */ reset():void; } -} \ No newline at end of file +}