mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
fix: nullable value for node-pdftk output method (#43672)
This commit is contained in:
2
types/node-pdftk/index.d.ts
vendored
2
types/node-pdftk/index.d.ts
vendored
@@ -54,7 +54,7 @@ export class PDFTK {
|
||||
* Run the command.
|
||||
*/
|
||||
output(writeFile: string, outputDest: string, needsOutput?: boolean): Promise<string>;
|
||||
output(writeFile: string): Promise<Buffer>;
|
||||
output(writeFile?: string): Promise<Buffer>;
|
||||
/**
|
||||
* Assembles ("concatenate") pages from input PDFs to create a new PDF.
|
||||
* @see {@link https://www.pdflabs.com/docs/pdftk-man-page/#dest-op-cat}
|
||||
|
||||
@@ -13,5 +13,7 @@ pdftk.allow(['FillIn']).attachFiles(['./file1.pdf', './file2.pdf']); // $ExpectT
|
||||
|
||||
pdftk.allow(['FillIn']).compress().output('./fileoutput.pdf'); // $ExpectType Promise<Buffer>
|
||||
pdftk.allow(['FillIn']).compress().output('./fileoutput.pdf', './destination/folder'); // $ExpectType Promise<string>
|
||||
pdftk.allow(['FillIn']).compress().output(); // $ExpectType Promise<Buffer>
|
||||
|
||||
PDFTK.input('file').flatten().ignoreWarnings().inputPw('password').burst('page_%02d.pdf'); // $ExpectType Promise<string>
|
||||
PDFTK.input('file').flatten().ignoreWarnings().inputPw('password').burst(); // $ExpectType Promise<Buffer>
|
||||
|
||||
Reference in New Issue
Block a user