0.18.4 • Published 6 months ago

@types/webshot-node v0.18.4

Weekly downloads
13
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/webshot-node

Summary

This package contains type definitions for webshot-node (https://github.com/architjn/node-webshot#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webshot-node.

index.d.ts

// Type definitions for webshot-node 0.18
// Project: https://github.com/architjn/node-webshot#readme
// Definitions by: Logan Kearsley <https://github.com/gliese1337>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node"/>

export = webshot;

declare function webshot(src: string, dst: string, options: webshot.Options, cb?: (e: Error | null) => void): void;
declare function webshot(src: string, dst: string, cb?: (e: Error | null) => void): void;
declare function webshot(src: string, options: webshot.Options, cb?: (e: Error | null) => void): NodeJS.ReadableStream;
declare function webshot(src: string, cb?: (e: Error | null) => void): NodeJS.ReadableStream;

declare namespace webshot {
    interface Options {
        windowSize?: {
            width: number;
            height: number;
        } | undefined;
        screenSize?: {
            width: number;
            height: number;
        } | undefined;
        shotSize?: {
            width: 'window' | 'all' | number;
            height: 'window' | 'all' | number;
        } | undefined;
        shotOffset?: {
            left: number;
            right: number;
            top: number;
            bottom: number;
        } | undefined;
        phantomPath?: string | undefined;
        phantomConfig?: {[key: string]: any} | undefined;
        cookies?: Array<{[key: string]: any}> | null | undefined;
        customHeaders?: Array<{[key: string]: any}> | null | undefined;
        defaultWhiteBackground?: boolean | undefined;
        customCSS?: string | undefined;
        quality?: number | undefined;
        streamType?: 'png' | 'jpg' | 'jpeg' | undefined;
        siteType?: 'url' | 'file' | 'html' | undefined;
        renderDelay?: number | undefined;
        timeout?: number | undefined;
        takeShotOnCallback?: boolean | undefined;
        errorIfStatusIsNot200?: boolean | undefined;
        errorIfJSException?: boolean | undefined;
        captureSelector?: boolean | undefined;
    }
}

Additional Details

  • Last updated: Fri, 02 Jul 2021 18:05:34 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Logan Kearsley.

0.18.2

8 months ago

0.18.3

7 months ago

0.18.4

6 months ago

0.18.1

3 years ago

0.18.0

4 years ago