mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-20 00:59:29 +08:00
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:
3
sax/index.d.ts
vendored
3
sax/index.d.ts
vendored
@@ -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;
|
||||
|
||||
@@ -13,6 +13,8 @@ import fs = require("fs");
|
||||
|
||||
let parser = sax.parser(/*strict=*/true, opts);
|
||||
|
||||
parser.ENTITIES["foo"] = "bar";
|
||||
|
||||
parser.onerror = function(e: Error) {
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user