@types/sharp
Advanced tools
Comparing version 0.27.3 to 0.28.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for sharp 0.27 | ||
// Type definitions for sharp 0.28 | ||
// Project: https://github.com/lovell/sharp | ||
@@ -14,3 +14,3 @@ // Definitions by: François Nguyen <https://github.com/lith-light-g> | ||
import { Duplex } from 'stream'; | ||
import { Duplex } from "stream"; | ||
@@ -121,5 +121,6 @@ //#region Constructor functions | ||
* Ensure alpha channel, if missing. The added alpha channel will be fully opaque. This is a no-op if the image already has an alpha channel. | ||
* @param alpha transparency level (0=fully-transparent, 1=fully-opaque) (optional, default 1). | ||
* @returns A sharp instance that can be used to chain operations | ||
*/ | ||
ensureAlpha(): Sharp; | ||
ensureAlpha(alpha?: number): Sharp; | ||
@@ -712,7 +713,13 @@ /** | ||
interface WriteableMetadata { | ||
/** Number value of the EXIF Orientation header, if present */ | ||
/** Value between 1 and 8, used to update the EXIF Orientation tag. */ | ||
orientation?: number; | ||
/** Filesystem path to output ICC profile, defaults to sRGB. */ | ||
icc?: string; | ||
/** Object keyed by IFD0, IFD1 etc. of key/value string pairs to write as EXIF data. (optional, default {}) */ | ||
exif?: Record<string, any>; | ||
} | ||
interface Metadata extends WriteableMetadata { | ||
interface Metadata { | ||
/** Number value of the EXIF Orientation header, if present */ | ||
orientation?: number; | ||
/** Name of decoder used to decompress image data e.g. jpeg, png, webp, gif, svg */ | ||
@@ -801,4 +808,2 @@ format?: keyof FormatEnum; | ||
interface OutputOptions { | ||
/** Quality, integer 1-100 (optional, default 80) */ | ||
quality?: number; | ||
/** Force format output, otherwise attempt to use input format (optional, default true) */ | ||
@@ -809,2 +814,4 @@ force?: boolean; | ||
interface JpegOptions extends OutputOptions { | ||
/** Quality, integer 1-100 (optional, default 80) */ | ||
quality?: number; | ||
/** Use progressive (interlace) scan (optional, default false) */ | ||
@@ -814,7 +821,7 @@ progressive?: boolean; | ||
chromaSubsampling?: string; | ||
/** Apply trellis quantisation, requires mozjpeg (optional, default false) */ | ||
/** Apply trellis quantisation (optional, default false) */ | ||
trellisQuantisation?: boolean; | ||
/** Apply overshoot deringing, requires mozjpeg (optional, default false) */ | ||
/** Apply overshoot deringing (optional, default false) */ | ||
overshootDeringing?: boolean; | ||
/** Optimise progressive scans, forces progressive, requires mozjpeg (optional, default false) */ | ||
/** Optimise progressive scans, forces progressive (optional, default false) */ | ||
optimiseScans?: boolean; | ||
@@ -827,9 +834,13 @@ /** Alternative spelling of optimiseScans (optional, default false) */ | ||
optimizeCoding?: boolean; | ||
/** Quantization table to use, integer 0-8, requires mozjpeg (optional, default 0) */ | ||
/** Quantization table to use, integer 0-8 (optional, default 0) */ | ||
quantisationTable?: number; | ||
/** Alternative spelling of quantisationTable (optional, default 0) */ | ||
quantizationTable?: number; | ||
/** Use mozjpeg defaults (optional, default false) */ | ||
mozjpeg?: boolean; | ||
} | ||
interface WebpOptions extends OutputOptions, AnimationOptions { | ||
/** Quality, integer 1-100 (optional, default 80) */ | ||
quality?: number; | ||
/** Quality of alpha layer, number from 0-100 (optional, default 100) */ | ||
@@ -860,3 +871,3 @@ alphaQuality?: number; | ||
/** compression format: av1, hevc (optional, default 'av1') */ | ||
compression?: 'av1' | 'hevc'; | ||
compression?: "av1" | "hevc"; | ||
/** use lossless compression (optional, default false) */ | ||
@@ -876,2 +887,4 @@ lossless?: boolean; | ||
interface TiffOptions extends OutputOptions { | ||
/** Quality, integer 1-100 (optional, default 80) */ | ||
quality?: number; | ||
/** Compression options: lzw, deflate, jpeg, ccittfax4 (optional, default 'jpeg') */ | ||
@@ -897,20 +910,18 @@ compression?: string; | ||
interface PngOptions { | ||
interface PngOptions extends OutputOptions { | ||
/** Use progressive (interlace) scan (optional, default false) */ | ||
progressive?: boolean; | ||
/** zlib compression level, 0-9 (optional, default 9) */ | ||
/** zlib compression level, 0-9 (optional, default 6) */ | ||
compressionLevel?: number; | ||
/** use adaptive row filtering (optional, default false) */ | ||
adaptiveFiltering?: boolean; | ||
/** Force PNG output, otherwise attempt to use input format (optional, default true) */ | ||
force?: boolean; | ||
/** use the lowest number of colours needed to achieve given quality, requires libimagequant (optional, default `100`) */ | ||
/** use the lowest number of colours needed to achieve given quality (optional, default `100`) */ | ||
quality?: number; | ||
/** Quantise to a palette-based image with alpha transparency support, requires libimagequant (optional, default false) */ | ||
/** Quantise to a palette-based image with alpha transparency support (optional, default false) */ | ||
palette?: boolean; | ||
/** Maximum number of palette entries, requires libimagequant (optional, default 256) */ | ||
/** Maximum number of palette entries (optional, default 256) */ | ||
colours?: number; | ||
/** Alternative Spelling of "colours". Maximum number of palette entries, requires libimagequant (optional, default 256) */ | ||
/** Alternative Spelling of "colours". Maximum number of palette entries (optional, default 256) */ | ||
colors?: number; | ||
/** Level of Floyd-Steinberg error diffusion, requires libimagequant (optional, default 1.0) */ | ||
/** Level of Floyd-Steinberg error diffusion (optional, default 1.0) */ | ||
dither?: number; | ||
@@ -960,7 +971,11 @@ } | ||
interface ExtendOptions { | ||
/** single pixel count to top edge (optional, default 0) */ | ||
top?: number; | ||
/** single pixel count to left edge (optional, default 0) */ | ||
left?: number; | ||
/** single pixel count to bottom edge (optional, default 0) */ | ||
bottom?: number; | ||
/** single pixel count to right edge (optional, default 0) */ | ||
right?: number; | ||
/** Background colour, parsed by the color module, defaults to black without transparency. (optional, default {r:0,g:0,b:0,alpha:1}) */ | ||
/** background colour, parsed by the color module, defaults to black without transparency. (optional, default {r:0,g:0,b:0,alpha:1}) */ | ||
background?: Color; | ||
@@ -1075,21 +1090,21 @@ } | ||
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"; | ||
} | ||
@@ -1099,3 +1114,3 @@ | ||
multiband: string; | ||
'b-w': string; | ||
"b-w": string; | ||
bw: string; | ||
@@ -1106,32 +1121,32 @@ cmyk: string; | ||
type TileLayout = 'dz' | 'iiif' | 'zoomify' | 'google'; | ||
type TileLayout = "dz" | "iiif" | "zoomify" | "google"; | ||
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'; | ||
| "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"; | ||
@@ -1138,0 +1153,0 @@ type Gravity = number | string; |
{ | ||
"name": "@types/sharp", | ||
"version": "0.27.3", | ||
"version": "0.28.0", | ||
"description": "TypeScript definitions for sharp", | ||
@@ -49,4 +49,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "cc087bd3273b4f63fa54f9d8edaea3b044a88a755ead80005b1e3ab2bbabb75c", | ||
"typesPublisherContentHash": "14bd88676732b4c66603d50c81e0f97eaebc777694daf4fd635c41bedca874be", | ||
"typeScriptVersion": "3.5" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Thu, 01 Apr 2021 08:01:12 GMT | ||
* Last updated: Tue, 06 Apr 2021 17:01:27 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56839
1062