@types/sax
Advanced tools
Comparing version 1.0.1 to 1.2.0
@@ -1,12 +0,12 @@ | ||
// Type definitions for sax-js 1.x | ||
// Type definitions for sax-js 1.2 | ||
// Project: https://github.com/isaacs/sax-js | ||
// Definitions by: Asana <https://asana.com> | ||
// Evert Pot <https://evertpot.com/> | ||
// Definitions by: Vincent Siao (Asana, Inc.) <https://github.com/vsiao> | ||
// Evert Pot <https://github.com/evert> | ||
// Daniel Cassidy <https://github.com/djcsdy> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
/// <reference types="node" /> | ||
export const EVENTS: string[]; | ||
export declare var EVENTS: string[]; | ||
interface SAXOptions { | ||
export interface SAXOptions { | ||
trim?: boolean; | ||
@@ -31,3 +31,3 @@ normalize?: boolean; | ||
interface BaseTag { | ||
export interface BaseTag { | ||
name: string; | ||
@@ -47,5 +47,5 @@ isSelfClosing: boolean; | ||
export declare function parser(strict: boolean, opt: SAXOptions): SAXParser; | ||
export declare class SAXParser { | ||
constructor(strict: boolean, opt?: SAXOptions); | ||
export function parser(strict?: boolean, opt?: SAXOptions): SAXParser; | ||
export class SAXParser { | ||
constructor(strict?: boolean, opt?: SAXOptions); | ||
@@ -91,6 +91,21 @@ // Methods | ||
import stream = require("stream"); | ||
export declare function createStream(strict: boolean, opt: SAXOptions): SAXStream; | ||
export declare class SAXStream extends stream.Duplex { | ||
constructor(strict: boolean, opt: SAXOptions); | ||
export function createStream(strict?: boolean, opt?: SAXOptions): SAXStream; | ||
export class SAXStream extends stream.Duplex { | ||
constructor(strict?: boolean, opt?: SAXOptions); | ||
private _parser: SAXParser; | ||
on(event: "text", listener: (this: this, text: string) => void): this; | ||
on(event: "doctype", listener: (this: this, doctype: string) => void): this; | ||
on(event: "processinginstruction", listener: (this: this, node: { name: string; body: string }) => void): this; | ||
on(event: "opentag", listener: (this: this, tag: Tag | QualifiedTag) => void): this; | ||
on(event: "closetag", listener: (this: this, tagName: string) => void): this; | ||
on(event: "attribute", listener: (this: this, attr: { name: string; value: string }) => void): this; | ||
on(event: "comment", listener: (this: this, comment: string) => void): this; | ||
on(event: "opencdata" | "closecdata" | "end" | "ready" | "close" | "readable" | "drain" | "finish", listener: (this: this) => void): this; | ||
on(event: "cdata", listener: (this: this, cdata: string) => void): this; | ||
on(event: "opennamespace" | "closenamespace", listener: (this: this, ns: { prefix: string; uri: string }) => void): this; | ||
on(event: "script", listener: (this: this, script: string) => void): this; | ||
on(event: "data", listener: (this: this, chunk: any) => void): this; | ||
on(event: "error", listener: (this: this, err: Error) => void): this; | ||
on(event: "pipe" | "unpipe", listener: (this: this, src: stream.Readable) => void): this; | ||
on(event: string | symbol, listener: (this: this, ...args: any[]) => void): this; | ||
} |
{ | ||
"name": "@types/sax", | ||
"version": "1.0.1", | ||
"version": "1.2.0", | ||
"description": "TypeScript definitions for sax-js", | ||
@@ -8,14 +8,23 @@ "license": "MIT", | ||
{ | ||
"name": "Asana", | ||
"url": "https://asana.com" | ||
"name": "Vincent Siao (Asana, Inc.)", | ||
"url": "https://github.com/vsiao", | ||
"githubUsername": "vsiao" | ||
}, | ||
{ | ||
"name": "Evert Pot", | ||
"url": "https://evertpot.com/" | ||
"url": "https://github.com/evert", | ||
"githubUsername": "evert" | ||
}, | ||
{ | ||
"name": "Daniel Cassidy", | ||
"url": "https://github.com/djcsdy", | ||
"githubUsername": "djcsdy" | ||
} | ||
], | ||
"main": "", | ||
"types": "index", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
"directory": "types/sax" | ||
}, | ||
@@ -26,4 +35,4 @@ "scripts": {}, | ||
}, | ||
"typesPublisherContentHash": "0121d9ccdfc553ea13dd9a37cbb0aea634d033ff8c561e117e64e985865e5808", | ||
"typesPublisherContentHash": "665cb75bcc31071f4325785f467198fd9c6820b348d115cd30143b8b12fb43b9", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -5,3 +5,3 @@ # Installation | ||
# Summary | ||
This package contains type definitions for sax-js (https://github.com/isaacs/sax-js). | ||
This package contains type definitions for sax-js ( https://github.com/isaacs/sax-js ). | ||
@@ -12,7 +12,7 @@ # Details | ||
Additional Details | ||
* Last updated: Thu, 21 Jun 2018 00:15:28 GMT | ||
* Dependencies: stream, node | ||
* Last updated: Fri, 31 May 2019 17:04:05 GMT | ||
* Dependencies: @types/node | ||
* Global values: none | ||
# Credits | ||
These definitions were written by Asana <https://asana.com>, Evert Pot <https://evertpot.com/>. | ||
These definitions were written by Vincent Siao (Asana, Inc.) <https://github.com/vsiao>, Evert Pot <https://github.com/evert>, Daniel Cassidy <https://github.com/djcsdy>. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6703
96