Add missing in(), out() & command() method definitions for gm package (#29475)

Definitions for [gm](https://github.com/aheckmann/gm) package are missing 3 methods - `command()`, `in()` and `out()`.
Usage of these methods is described [here](https://github.com/aheckmann/gm#custom-arguments).

Also, this should resolve #24795
This commit is contained in:
Vaclav Mlejnsky
2018-10-05 11:09:52 -07:00
committed by Wesley Wigham
parent 1ab3279c8d
commit d5f7360491
2 changed files with 12 additions and 1 deletions
+6
View File
@@ -63,6 +63,9 @@ declare const quality: number;
declare const align: string;
declare const depth: number;
declare const defineValue: string;
declare const customCommand: string;
declare const customInArguments: string[];
declare const customOutArguments: string[];
let readStream: stream.PassThrough;
gm(src)
@@ -95,6 +98,7 @@ gm(src)
.colorMap(type)
.colors(numColors)
.colorspace(type)
.command(customCommand)
.compose(operator)
.compress(type)
.contrast(multiplier)
@@ -147,6 +151,7 @@ gm(src)
.iconGeometry(geometry)
.implode()
.implode(factor)
.in(...customInArguments)
.intent(type)
.interlace(type)
.label(name)
@@ -192,6 +197,7 @@ gm(src)
.operator(channel, operator, factor)
.operator(channel, operator, factor, usePercent)
.orderedDither(channel, NxN)
.out(...customOutArguments)
.outputDirectory(dest)
.page(width, height)
.page(width, height, options)
+6 -1
View File
@@ -1,6 +1,8 @@
// Type definitions for gm 1.18
// Project: https://github.com/aheckmann/gm
// Definitions by: Joel Spadin <https://github.com/ChaosinaCan>, Maarten van Vliet <https://github.com/maartenvanvliet>
// Definitions by: Joel Spadin <https://github.com/ChaosinaCan>
// Maarten van Vliet <https://github.com/maartenvanvliet>
// Vaclav Mlejnsky <https://github.com/mlejva>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node"/>
@@ -115,6 +117,7 @@ declare namespace m {
colorMap(type: 'shared' | 'private' | string): State;
colors(colors: number): State;
colorspace(space: ColorSpace | string): State;
command(customCommand: string): State;
compose(operator: ComposeOperator | string): State;
compress(type: CompressionType | string): State;
contrast(multiplier: number): State;
@@ -157,6 +160,7 @@ declare namespace m {
highlightStyle(style: HighlightStyle | string): State;
iconGeometry(geometry: string): State;
implode(factor?: number): State;
in(...customArguments: string[]): State;
intent(type: IntentType | string): State;
interlace(type: InterlaceType | string): State;
label(name: string): State;
@@ -190,6 +194,7 @@ declare namespace m {
opaque(color: string): State;
operator(channel: string, operator: ChannelOperator | string, rvalue: number, percent?: boolean): State;
orderedDither(channelType: ChannelType | string, NxN: string): State;
out(...customArguments: string[]): State;
outputDirectory(directory: string): State;
page(width: number, height: number, arg?: '%' | '!' | '<' | '>' |string): State;
pause(seconds: number): State;