1.4.6 • Published 7 months ago
@types/jsreport-phantom-pdf v1.4.6
Installation
npm install --save @types/jsreport-phantom-pdf
Summary
This package contains type definitions for jsreport-phantom-pdf (https://github.com/jsreport/jsreport-phantom-pdf).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsreport-phantom-pdf.
index.d.ts
// Type definitions for jsreport-phantom-pdf 1.4
// Project: https://github.com/jsreport/jsreport-phantom-pdf
// Definitions by: taoqf <https://github.com/taoqf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { ExtensionDefinition, Template } from 'jsreport-core';
declare namespace JsReportPhantomPdf {
interface Margin {
left: number | string;
right: number | string;
top: number | string;
bottom: number | string;
}
interface Phantom {
margin: string | Margin;
header: string;
footer: string;
width: string;
height: string;
headerHeight: string;
footerHeight: string;
format: string;
orientation: 'portrait' | 'landscape';
blockJavaScript: boolean;
resourceTimeout: number;
waitForJS: boolean;
fitToPage: boolean;
customPhantomJS: boolean;
phantomjsVersion: string;
}
// const enum PhantomStrategy {
// dedicatedProcess = 'dedicated-process',
// phantomServer = 'phantom-server'
// }
interface Options {
allowLocalFilesAccess: boolean;
// appDirectory: string;
defaultPhantomjsVersion: string;
strategy: 'dedicated-process' | 'phantom-server';
timeout: number;
}
// without exporting enum, it doesn't include the require('jsreport-core') in the test.js for some reason
// help welcome
// export enum Foo { }
interface PhantomPDFTemplate extends Template {
phantom?: Partial<Phantom> | undefined;
recipe: 'phantom-pdf' | string;
}
}
declare module 'jsreport-core' {
interface TemplateRegistry {
PhantomPDFTemplate: JsReportPhantomPdf.PhantomPDFTemplate;
}
}
declare function JsReportPhantomPdf(options?: Partial<JsReportPhantomPdf.Options>): ExtensionDefinition;
export = JsReportPhantomPdf;
Additional Details
- Last updated: Thu, 08 Jul 2021 16:22:57 GMT
- Dependencies: @types/jsreport-core
- Global values: none
Credits
These definitions were written by taoqf.