DefinitelyTyped/types/libxslt/internal-types.d.ts
ComFreek bc93f0695f libxmljs: add typings for latest version
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.
2018-06-08 08:29:37 +02:00

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;