Socket
Socket
Sign inDemoInstall

@types/sharp

Package Overview
Dependencies
1
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.25.1 to 0.26.0

105

sharp/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for sharp 0.25
// Type definitions for sharp 0.26
// Project: https://github.com/lovell/sharp

@@ -13,3 +13,3 @@ // Definitions by: François Nguyen <https://github.com/lith-light-g>

import { Duplex } from "stream";
import { Duplex } from 'stream';

@@ -411,3 +411,3 @@ //#region Constructor functions

*/
modulate(options?: { brightness?: number, saturation?: number, hue?: number }): Sharp;
modulate(options?: { brightness?: number; saturation?: number; hue?: number }): Sharp;

@@ -461,3 +461,3 @@ //#endregion

*/
toBuffer(options: { resolveWithObject: true }): Promise<{ data: Buffer, info: OutputInfo }>;
toBuffer(options: { resolveWithObject: true }): Promise<{ data: Buffer; info: OutputInfo }>;

@@ -520,3 +520,6 @@ /**

*/
toFormat(format: string | AvailableFormatInfo, options?: OutputOptions | JpegOptions | PngOptions | WebpOptions | TiffOptions): Sharp;
toFormat(
format: string | AvailableFormatInfo,
options?: OutputOptions | JpegOptions | PngOptions | WebpOptions | TiffOptions,
): Sharp;

@@ -736,2 +739,6 @@ /**

entropy: number;
/** Estimation of greyscale sharpness based on the standard deviation of a Laplacian convolution, discarding alpha channel if any (experimental) */
sharpness: number;
/** Object containing most dominant sRGB colour based on a 4096-bin 3D histogram (experimental) */
dominant: { r: number; g: number; b: number };
}

@@ -810,2 +817,10 @@

predictor?: string;
/** Write an image pyramid (optional, default false) */
pyramid?: boolean;
/** Write a tiled tiff (optional, default false) */
tile?: boolean;
/** Horizontal tile size (optional, default 256) */
tileWidth?: boolean;
/** Vertical tile size (optional, default 256) */
tileHeight?: boolean;
/** Horizontal resolution in pixels/mm (optional, default 1.0) */

@@ -815,4 +830,4 @@ xres?: number;

yres?: number;
/** Squash 8-bit images down to 1 bit (optional, default false) */
squash?: boolean;
/** Reduce bitdepth to 1, 2 or 4 bit (optional, default 8) */
bitdepth?: 1 | 2 | 4 | 8;
}

@@ -924,3 +939,3 @@

/** Buffer containing image data, String containing the path to an image file, or Create object */
input?: string | Buffer | {create: Create};
input?: string | Buffer | { create: Create };
/** how to blend this image with the image below. (optional, default `'over'`) */

@@ -979,26 +994,26 @@ blend?: Blend;

id: string;
input: { file: boolean; buffer: boolean; stream: boolean; };
output: { file: boolean; buffer: boolean; stream: boolean; };
input: { file: boolean; buffer: boolean; stream: boolean };
output: { file: boolean; buffer: boolean; stream: boolean };
}
interface FitEnum {
contain: "contain";
cover: "cover";
fill: "fill";
inside: "inside";
outside: "outside";
contain: 'contain';
cover: 'cover';
fill: 'fill';
inside: 'inside';
outside: 'outside';
}
interface KernelEnum {
nearest: "nearest";
cubic: "cubic";
mitchell: "mitchell";
lanczos2: "lanczos2";
lanczos3: "lanczos3";
nearest: 'nearest';
cubic: 'cubic';
mitchell: 'mitchell';
lanczos2: 'lanczos2';
lanczos3: 'lanczos3';
}
interface BoolEnum {
and: "and";
or: "or";
eor: "eor";
and: 'and';
or: 'or';
eor: 'eor';
}

@@ -1008,3 +1023,3 @@

multiband: string;
"b-w": string;
'b-w': string;
bw: string;

@@ -1017,4 +1032,30 @@ cmyk: string;

type Blend = 'clear' | 'source' | 'over' | 'in' | 'out' | 'atop' | 'dest' | 'dest-over' | 'dest-in' | 'dest-out' | 'dest-atop' | 'xor' | 'add' | 'saturate' | 'multiply' | 'screen' | 'overlay'
| 'darken' | 'lighten' | 'colour-dodge' | 'colour-dodge' | 'colour-burn' | 'colour-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion';
type Blend =
| 'clear'
| 'source'
| 'over'
| 'in'
| 'out'
| 'atop'
| 'dest'
| 'dest-over'
| 'dest-in'
| 'dest-out'
| 'dest-atop'
| 'xor'
| 'add'
| 'saturate'
| 'multiply'
| 'screen'
| 'overlay'
| 'darken'
| 'lighten'
| 'colour-dodge'
| 'colour-dodge'
| 'colour-burn'
| 'colour-burn'
| 'hard-light'
| 'soft-light'
| 'difference'
| 'exclusion';

@@ -1060,14 +1101,10 @@ type Gravity = number | string;

interface CacheResult {
memory: { current: number; high: number; max: number; };
files: { current: number; max: number; };
items: { current: number; max: number; };
memory: { current: number; high: number; max: number };
files: { current: number; max: number };
items: { current: number; max: number };
}
type Matrix3x3 = [
[number, number, number],
[number, number, number],
[number, number, number]
];
type Matrix3x3 = [[number, number, number], [number, number, number], [number, number, number]];
}
export = sharp;
{
"name": "@types/sharp",
"version": "0.25.1",
"version": "0.26.0",
"description": "TypeScript definitions for sharp",

@@ -44,4 +44,4 @@ "license": "MIT",

},
"typesPublisherContentHash": "4a414b0fa47d77b16fec45a8081233042834bbea3fdabc1410264877ebcc9685",
"typeScriptVersion": "3.0"
"typesPublisherContentHash": "eb96d5e9bacae94866bb2bc9f5e2c75c816eb2898c4deb44753cafd15886c706",
"typeScriptVersion": "3.1"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Tue, 21 Jul 2020 22:10:19 GMT
* Last updated: Fri, 11 Sep 2020 10:21:02 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc