mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Important changes of the v0.18 version: - The previous libxmljs-tests.ts file used a require, thus made any variable from the imported 'libxmljs' typed 'any'. Hence, the test file actually tested no type declarations at all. This has been fixed via an ordinary 'import' statement. - Enabled strict null checks in tsconfig.json - Removed some exported classes (such as XMLDocument, HTMLDocument) which are neither used nor exported anymore in more recent libxmljs versions. - Added null return values to functions which sometimes return null, e.g. prevSibling(): Node|null.
12 lines
476 B
TypeScript
12 lines
476 B
TypeScript
import * as xmljs from 'libxmljs';
|
|
import { Stylesheet } from './index';
|
|
|
|
export type OutputFormat = 'document' | 'string';
|
|
|
|
export type ApplyResult = string | xmljs.Document;
|
|
export type ApplyCallback = (err: Error, result: ApplyResult) => void;
|
|
export type ApplyStringCallback = (err: Error, result: string) => void;
|
|
export type ApplyDocumentCallback = (err: Error, result: xmljs.Document) => void;
|
|
|
|
export type ParseCallback = (err: Error, stylesheet: Stylesheet) => void;
|