@types/save-pixels
TypeScript icon, indicating that this package has built-in type declarations

2.3.4 • Public • Published

Installation

npm install --save @types/save-pixels

Summary

This package contains type definitions for save-pixels (https://github.com/mikolalysenko/save-pixels#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/save-pixels.

index.d.ts

/// <reference types="node" />

import { NdArray } from "ndarray";
import * as Stream from "stream";

// Function overloads. Most types return a Stream, except 'canvas'. Quality option only available for
// JPEG format. See https://www.npmjs.com/package/save-pixels#requiresave-pixelsarray-type-options.
declare function savePixels(array: NdArray, type: "png" | "gif"): Stream;
declare function savePixels(array: NdArray, type: "canvas"): HTMLCanvasElement;
declare function savePixels(array: NdArray, type: "jpeg" | "jpg", options?: { quality?: number | undefined }): Stream;

export = savePixels;

Additional Details

Credits

These definitions were written by Don McCurdy.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/save-pixels

Weekly Downloads

45

Version

2.3.4

License

MIT

Unpacked Size

3.94 kB

Total Files

5

Last publish

Collaborators

  • types