mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
feat: update pdfmake (#34830)
This commit is contained in:
committed by
Pranav Senthilnathan
parent
93d055288f
commit
3c2a4dda5e
44
types/pdfmake/index.d.ts
vendored
44
types/pdfmake/index.d.ts
vendored
@@ -16,7 +16,7 @@ declare module 'pdfmake/build/vfs_fonts' {
|
||||
declare module 'pdfmake/build/pdfmake' {
|
||||
let vfs: TFontFamily;
|
||||
let fonts: { [name: string]: TFontFamilyTypes };
|
||||
function createPdf(documentDefinitions: TDocumentDefinitions): TCreatedPdf;
|
||||
function createPdf(documentDefinitions: TDocumentDefinitions, tableLayouts?: any, fonts?: any, vfs?: any): TCreatedPdf;
|
||||
|
||||
enum PageSize {
|
||||
A0_x_4 = '4A0',
|
||||
@@ -183,16 +183,46 @@ declare module 'pdfmake/build/pdfmake' {
|
||||
defaultStyle?: Style;
|
||||
}
|
||||
|
||||
type CreatedPdfParams = (
|
||||
interface Pagesize {
|
||||
height: number;
|
||||
width: number;
|
||||
orientation: PageOrientation;
|
||||
}
|
||||
|
||||
interface Page {
|
||||
items: any[];
|
||||
pageSize: Pagesize;
|
||||
}
|
||||
|
||||
interface BufferOptions {
|
||||
autoPrint?: boolean;
|
||||
}
|
||||
|
||||
type CreatedPdfDownloadParams = (
|
||||
defaultFileName?: string,
|
||||
cb?: string,
|
||||
options?: string
|
||||
cb?: () => void,
|
||||
options?: BufferOptions,
|
||||
) => void;
|
||||
|
||||
type CreatedPdfOpenPrintParams = (
|
||||
options?: BufferOptions,
|
||||
win?: Window | null,
|
||||
) => void;
|
||||
|
||||
type CreatedPdfBufferParams = (
|
||||
cb: (result: any, pages: Page[]) => void,
|
||||
options?: BufferOptions,
|
||||
) => void;
|
||||
|
||||
interface TCreatedPdf {
|
||||
download: CreatedPdfParams;
|
||||
open: CreatedPdfParams;
|
||||
print: CreatedPdfParams;
|
||||
download: CreatedPdfDownloadParams;
|
||||
getBlob: CreatedPdfBufferParams;
|
||||
getBase64: CreatedPdfBufferParams;
|
||||
getBuffer: CreatedPdfBufferParams;
|
||||
getDataUrl: CreatedPdfBufferParams;
|
||||
getStream: CreatedPdfBufferParams; // minimal version 0.1.41
|
||||
open: CreatedPdfOpenPrintParams;
|
||||
print: CreatedPdfOpenPrintParams;
|
||||
}
|
||||
|
||||
interface pdfMakeStatic {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"dom",
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
|
||||
Reference in New Issue
Block a user