[@types/gm] Update to 1.25 (#62839)

This commit is contained in:
Dmitry Semigradsky
2022-11-14 19:59:52 +03:00
committed by GitHub
parent 7f8c484992
commit a6b6671ab5
2 changed files with 16 additions and 4 deletions

View File

@@ -77,8 +77,12 @@ gm(src)
.antialias(enable)
.append(src)
.append(src, ltr)
.append([src, src, src], ltr)
.append(ltr)
.append()
.authenticate(password)
.autoOrient()
.average()
.backdrop()
.background(color)
.bitdepth(bits)
@@ -265,6 +269,7 @@ gm(src)
.strip()
.swirl(angle)
.textFont(font)
.texture(file)
.threshold(threshold)
.threshold(threshold, usePercent)
.thumb(width, height, dest, (err, stdout, stderr, cmd) => {
@@ -273,6 +278,8 @@ gm(src)
})
.thumb(width, height, dest, quality, align, (err, stdout, stderr, cmd) => {
})
.thumbnail(width, height)
.thumbnail(width, height, options)
.tile(file)
.title(name)
.transform(color)
@@ -377,7 +384,7 @@ readStream = imageMagick(src)
.adjoin()
.stream();
const customGm = gm.subClass({ appPath: '' });
const customGm = gm.subClass({ imageMagick: '7+', appPath: '' });
readStream = customGm(src).stream();
const stringTimeoutGm = gm.subClass({ timeout: "0" });

11
types/gm/index.d.ts vendored
View File

@@ -1,8 +1,9 @@
// Type definitions for gm 1.18
// Type definitions for gm 1.25
// Project: https://github.com/aheckmann/gm
// Definitions by: Maarten van Vliet <https://github.com/maartenvanvliet>
// Vaclav Mlejnsky <https://github.com/mlejva>
// Dimitry Kooijmans <https://github.com/mrcageman>
// Dmitry Semigradsky <https://github.com/Semigradsky>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node"/>
@@ -15,7 +16,7 @@ declare function m(width: number, height: number, color?: string): m.State;
declare namespace m {
interface ClassOptions {
appPath?: string | undefined;
imageMagick?: boolean | undefined;
imageMagick?: string | boolean | undefined;
nativeAutoOrient?: boolean | undefined;
timeout?: string | number;
}
@@ -97,9 +98,11 @@ declare namespace m {
adjoin(): State;
affine(matrix: string): State;
antialias(enable: boolean): State;
append(image: string, ltr?: boolean): State;
append(ltr?: boolean): State;
append(image: string | string[], ltr?: boolean): State;
authenticate(password: string): State;
autoOrient(): State;
average(): State;
backdrop(): State;
background(color: string): State;
bitdepth(bits: number): State;
@@ -254,10 +257,12 @@ declare namespace m {
strip(): State;
swirl(degrees: number): State;
textFont(font: string): State;
texture(filename: string): State;
threshold(value: number, percent?: boolean): State;
thumb(width: number, height: number, outName: string, callback: WriteCallback): State;
thumb(width: number, height: number, outName: string, quality: number, callback: WriteCallback): State;
thumb(width: number, height: number, outName: string, quality: number, align: 'topleft' | 'center' | string, callback: WriteCallback): State;
thumbnail(width: number, height: number, options?: ResizeOption): State;
tile(filename: string): State;
title(title: string): State;
transform(color: string): State;