mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
* Definitions to "pdf-image" package * Using readonly for array and options in parameters
22 lines
593 B
TypeScript
22 lines
593 B
TypeScript
import { PDFImage } from 'pdf-image';
|
|
|
|
// $ExpectType PDFImage<false>
|
|
new PDFImage('path');
|
|
|
|
// $ExpectType Promise<string[]>
|
|
new PDFImage('path').convertFile();
|
|
|
|
// $ExpectType Promise<string>
|
|
new PDFImage('path', { combinedImage: true }).convertFile();
|
|
|
|
// $ExpectType Promise<string | string[]>
|
|
new PDFImage<boolean>('path', { combinedImage: true }).convertFile();
|
|
|
|
// $ExpectError
|
|
new PDFImage<false>('path', { combinedImage: true });
|
|
|
|
new PDFImage('path', { convertOptions: { "-adaptive-blur": '' } });
|
|
|
|
// $ExpectError
|
|
new PDFImage('path', { convertOptions: { invalidOptionKey: '' } });
|