sharp: fix incorrect versions type (#18352)

Add an optional extended description…
This commit is contained in:
Christian
2017-08-01 16:30:21 -07:00
committed by Sheetal Nandi
parent eac5ab3c27
commit ec49f4dc87
2 changed files with 32 additions and 1 deletions
+26 -1
View File
@@ -51,7 +51,32 @@ declare namespace sharp {
/** An EventEmitter that emits a change event when a task is either queued, waiting for libuv to provide a worker thread, complete */
const queue: NodeJS.EventEmitter;
/** An Object containing the version numbers of libvips and its dependencies. */
const versions: string[];
const versions: {
vips: string;
cairo?: string;
croco?: string;
exif?: string;
expat?: string;
ffi?: string;
fontconfig?: string;
freetype?: string;
gdkpixbuf?: string;
gif?: string;
glib?: string;
gsf?: string;
harfbuzz?: string;
jpeg?: string;
lcms?: string;
orc?: string;
pango?: string;
pixman?: string;
png?: string;
svg?: string;
tiff?: string;
webp?: string;
xml?: string;
zlib?: string;
};
const bool: BoolEnum;
interface SharpInstance extends Duplex {
+6
View File
@@ -200,3 +200,9 @@ let simd: boolean = sharp.simd();
simd = sharp.simd(true);
// attempts to enable the use of SIMD, returning true if available
const vipsVersion: string = sharp.versions.vips;
if (sharp.versions.cairo) {
const cairoVersion: string = sharp.versions.cairo;
}