1.0.4 • Published 6 months ago
@types/pdf-thumbnail v1.0.4
Installation
npm install --save @types/pdf-thumbnail
Summary
This package contains type definitions for pdf-thumbnail (https://github.com/nicoFuccella/pdf-thumbnail#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pdf-thumbnail.
index.d.ts
// Type definitions for pdf-thumbnail 1.0
// Project: https://github.com/nicoFuccella/pdf-thumbnail#readme
// Definitions by: Kirill Koshil <https://github.com/koshilki>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
declare namespace pdf {
type Operations = 'compress' | 'crop' | 'resize';
interface CompressParams {
type?: string | undefined;
quality?: number | undefined;
}
interface CropParams {
width: number;
height: number;
x: number;
y: number;
ratio?: boolean | undefined;
}
interface ResizeParams {
width?: number | undefined;
height?: number | undefined;
}
interface OperationsParams {
compress: CompressParams;
crop: CropParams;
resize: ResizeParams;
}
type PDFThumbnailOptions = {
[op in Operations]?: OperationsParams[op];
};
}
declare function pdf(
body: NodeJS.ReadableStream | Buffer | string,
options?: pdf.PDFThumbnailOptions,
): Promise<NodeJS.ReadableStream>;
export = pdf;
Additional Details
- Last updated: Thu, 08 Jul 2021 20:19:30 GMT
- Dependencies: @types/node
- Global values: none
Credits
These definitions were written by Kirill Koshil.