Socket
Socket
Sign inDemoInstall

@types/sharp

Package Overview
Dependencies
2
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.29.5 to 0.30.0

91

sharp/index.d.ts

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

// Type definitions for sharp 0.29
// Type definitions for sharp 0.30
// Project: https://github.com/lovell/sharp

@@ -76,2 +76,8 @@ // Definitions by: Wooseop Kim <https://github.com/wooseopkim>

/** An Object containing the platform and architecture of the current and installed vendored binaries. */
const vendor: {
current: string;
installed: string[];
};
/** An EventEmitter that emits a change event when a task is either queued, waiting for libuv to provide a worker thread, complete */

@@ -731,2 +737,4 @@ const queue: NodeJS.EventEmitter;

limitInputPixels?: number | boolean | undefined;
/** Set this to true to remove safety features that help prevent memory exhaustion (SVG, PNG). (optional, default false) */
unlimited?: boolean | undefined;
/** Set this to true to use sequential rather than random access where possible. This can reduce memory usage and might improve performance on some systems. (optional, default false) */

@@ -740,2 +748,4 @@ sequentialRead?: boolean | undefined;

page?: number | undefined;
/** subIFD (Sub Image File Directory) to extract for OME-TIFF, defaults to main image. (optional, default -1) */
subifd?: number | undefined;
/** Level to extract from a multi-level input (OpenSlide), zero based. (optional, default 0) */

@@ -787,2 +797,4 @@ level?: number | undefined;

background: Color;
/** Describes a noise to be created. */
noise?: Noise | undefined;
}

@@ -934,2 +946,7 @@

/** Level of CPU effort to reduce file size, integer 0-6 (optional, default 4) */
effort?: number | undefined;
/**
* Level of CPU effort to reduce file size, integer 0-6 (optional, default 4)
* @deprecated Use `effort` instead
*/
reductionEffort?: number | undefined;

@@ -943,6 +960,11 @@ }

lossless?: boolean | undefined;
/** CPU effort vs file size, 0 (slowest/smallest) to 9 (fastest/largest) (optional, default 5) */
/**
* CPU effort vs file size, 0 (slowest/smallest) to 9 (fastest/largest) (optional, default 5)
* @deprecated Use `effort` instead
*/
speed?: number | undefined;
/** Level of CPU effort to reduce file size, between 0 (fastest) and 9 (slowest) (optional, default 4) */
effort?: number | undefined;
/** set to '4:2:0' to use chroma subsampling, requires libvips v8.11.0 (optional, default '4:4:4') */
chromaSubsampling?: string;
chromaSubsampling?: string | undefined;
}

@@ -957,20 +979,20 @@

lossless?: boolean | undefined;
/** CPU effort vs file size, 0 (slowest/smallest) to 9 (fastest/largest) (optional, default 5) */
/**
* effort vs file size, 0 (slowest/smallest) to 9 (fastest/largest) (optional, default 5)
* @deprecated Use `effort` instead
*/
speed?: number | undefined;
/** Level of CPU effort to reduce file size, between 0 (fastest) and 9 (slowest) (optional, default 4) */
effort?: number | undefined;
}
/**
* Requires libvips compiled with support for ImageMagick or GraphicsMagick.
* The prebuilt binaries do not include this - see
* {@link https://sharp.pixelplumbing.com/install#custom-libvips installing a custom libvips}.
*/
interface GifOptions extends OutputOptions, AnimationOptions {
/** Page height for animated output */
pageHeight?: number;
/** Number of animation iterations, use 0 for infinite animation (optional, default 0) */
loop?: number;
/** List of delays between animation frames (in milliseconds) */
delay?: number[];
/** Force GIF output, otherwise attempt to use input format (optional, default true) */
force?: boolean;
/** Maximum number of palette entries, including transparency, between 2 and 256 (optional, default 256) */
colours?: number | undefined;
/** Alternative Spelling of "colours". Maximum number of palette entries, including transparency, between 2 and 256 (optional, default 256) */
colors?: number | undefined;
/** Level of CPU effort to reduce file size, between 1 (fastest) and 10 (slowest) (optional, default 7) */
effort?: number | undefined;
/** Level of Floyd-Steinberg error diffusion, between 0 (least) and 1 (most) (optional, default 1.0) */
dither?: number | undefined;
}

@@ -999,2 +1021,4 @@

bitdepth?: 1 | 2 | 4 | 8 | undefined;
/** Resolution unit options: inch, cm (optional, default 'inch') */
resolutionUnit?: 'inch' | 'cm' | undefined;
}

@@ -1007,6 +1031,8 @@

compressionLevel?: number | undefined;
/** use adaptive row filtering (optional, default false) */
/** Use adaptive row filtering (optional, default false) */
adaptiveFiltering?: boolean | undefined;
/** use the lowest number of colours needed to achieve given quality (optional, default `100`) */
/** Use the lowest number of colours needed to achieve given quality (optional, default `100`) */
quality?: number | undefined;
/** Level of CPU effort to reduce file size, between 1 (fastest) and 10 (slowest), sets palette to true (optional, default 7) */
effort?: number | undefined;
/** Quantise to a palette-based image with alpha transparency support (optional, default false) */

@@ -1052,2 +1078,4 @@ palette?: boolean | undefined;

withoutEnlargement?: boolean | undefined;
/** Do not reduce if the width or height are already greater than the specified dimensions, equivalent to GraphicsMagick's < geometry option. (optional, default false) */
withoutReduction?: boolean | undefined;
/** Take greater advantage of the JPEG and WebP shrink-on-load feature, which can lead to a slight moiré pattern on some images. (optional, default true) */

@@ -1068,2 +1096,11 @@ fastShrinkOnLoad?: boolean | undefined;

interface Noise {
/** type of generated noise, currently only gaussian is supported. */
type?: 'gaussian' | undefined;
/** mean of pixels in generated noise. */
mean?: number | undefined;
/** standard deviation of pixels in generated noise. */
sigma?: number | undefined;
}
interface ExtendOptions {

@@ -1169,13 +1206,17 @@ /** single pixel count to top edge (optional, default 0) */

container?: string | undefined;
/** Filesystem layout, possible values are dz, iiif, zoomify or google. (optional, default 'dz') */
/** Filesystem layout, possible values are dz, iiif, iiif3, zoomify or google. (optional, default 'dz') */
layout?: TileLayout | undefined;
/** Centre image in tile. (optional, default false) */
centre?: boolean | undefined;
/** Alternative spelling of centre. (optional, default false) */
center?: boolean | undefined;
/** When layout is iiif/iiif3, sets the @id/id attribute of info.json (optional, default 'https://example.com/iiif') */
id?: string | undefined;
}
interface AnimationOptions {
/** Page height for animated output, a value greater than 0. (optional) */
pageHeight?: number | undefined;
/** Number of animation iterations, a value between 0 and 65535. Use 0 for infinite animation. (optional, default 0) */
loop?: number | undefined;
/** List of delays between animation frames (in milliseconds), each value between 0 and 65535. (optional) */
delay?: number[] | undefined;
/** delay(s) between animation frames (in milliseconds), each value between 0 and 65535. (optional) */
delay?: number | number[] | undefined;
}

@@ -1237,3 +1278,3 @@

type TileLayout = 'dz' | 'iiif' | 'zoomify' | 'google';
type TileLayout = 'dz' | 'iiif' | 'iiif3' | 'zoomify' | 'google';

@@ -1240,0 +1281,0 @@ type Blend =

{
"name": "@types/sharp",
"version": "0.29.5",
"version": "0.30.0",
"description": "TypeScript definitions for sharp",

@@ -50,4 +50,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sharp",

},
"typesPublisherContentHash": "8b1858d185de8ee35cde111f565be237931eb72bab6a2227b5ce75c2d9ea91d9",
"typeScriptVersion": "3.8"
"typesPublisherContentHash": "c9d8e4c392f751895bdae16e3cd13dcce833b25833ea86135d86c5205247b7cd",
"typeScriptVersion": "3.9"
}

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

### Additional Details
* Last updated: Thu, 23 Dec 2021 23:35:49 GMT
* Last updated: Thu, 10 Mar 2022 23:31:46 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc