Added the ENTITIES member to SAXParser.

The README is clear that the ENTITIES member is accessible to client
code and can be modified by client code as needed. See:

https://github.com/isaacs/sax-js/blob/v1.2.1/README.md#regarding-doctypes-and-entitys
This commit is contained in:
Louis-Dominique Dubeau
2017-01-19 14:31:14 -05:00
parent 990b141be2
commit 53c2f486cc
2 changed files with 4 additions and 1 deletions

3
sax/index.d.ts vendored
View File

@@ -1,4 +1,4 @@
// Type definitions for sax js
// Type definitions for sax-js 1.x
// Project: https://github.com/isaacs/sax-js
// Definitions by: Asana <https://asana.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -63,6 +63,7 @@ export declare class SAXParser {
strict: boolean;
opt: SAXOptions;
tag: string;
ENTITIES: {[key: string]: string};
// Events
onerror(e: Error): void;

View File

@@ -13,6 +13,8 @@ import fs = require("fs");
let parser = sax.parser(/*strict=*/true, opts);
parser.ENTITIES["foo"] = "bar";
parser.onerror = function(e: Error) {
};