@types/lqip-modern
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -29,17 +29,17 @@ // Type definitions for lqip-modern 1.1 | ||
interface DefaultOptions { | ||
concurrency?: number; | ||
resize?: number | ReadonlyArray<any>; | ||
concurrency?: number | undefined; | ||
resize?: number | ReadonlyArray<any> | undefined; | ||
} | ||
interface WebpOptions extends DefaultOptions { | ||
readonly outputFormat?: 'webp'; | ||
readonly outputOptions?: sharp.WebpOptions; | ||
readonly outputFormat?: 'webp' | undefined; | ||
readonly outputOptions?: sharp.WebpOptions | undefined; | ||
} | ||
interface JpegOptions extends DefaultOptions { | ||
readonly outputFormat: 'jpeg'; | ||
readonly outputOptions?: sharp.JpegOptions; | ||
readonly outputOptions?: sharp.JpegOptions | undefined; | ||
} | ||
interface JpgOptions extends DefaultOptions { | ||
readonly outputFormat: 'jpg'; | ||
readonly outputOptions?: sharp.JpegOptions; | ||
readonly outputOptions?: sharp.JpegOptions | undefined; | ||
} | ||
@@ -46,0 +46,0 @@ } |
{ | ||
"name": "@types/lqip-modern", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "TypeScript definitions for lqip-modern", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lqip-modern", | ||
"license": "MIT", | ||
@@ -25,4 +26,4 @@ "contributors": [ | ||
}, | ||
"typesPublisherContentHash": "ee8192787235ff19284dc0343210696de68b561ab0029edb6226026cc69f5866", | ||
"typeScriptVersion": "3.3" | ||
"typesPublisherContentHash": "9bc5105f5a6f644578e5048cb95271da7245ce927d23804ef397e7f8d054a5b1", | ||
"typeScriptVersion": "3.6" | ||
} |
@@ -9,5 +9,62 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lqip-modern. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lqip-modern/index.d.ts) | ||
````ts | ||
// Type definitions for lqip-modern 1.1 | ||
// Project: https://github.com/transitive-bullshit/lqip-modern/ | ||
// Definitions by: Yaroslav Kiliba <https://github.com/Dattaya> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// Minimum TypeScript Version: 3.2 | ||
/// <reference types="node" /> | ||
import sharp = require('sharp'); | ||
declare namespace lqip { | ||
interface LqipResult { | ||
content: Buffer; | ||
metadata: { | ||
originalWidth: number; | ||
originalHeight: number; | ||
width: number; | ||
height: number; | ||
type: OutputFormat; | ||
dataURIBase64: string; | ||
}; | ||
} | ||
type OutputFormat = WebpOptions['outputFormat'] | JpegOptions['outputFormat'] | JpgOptions['outputFormat']; | ||
type LqipOptions = WebpOptions | JpegOptions | JpgOptions | DefaultOptions; | ||
interface DefaultOptions { | ||
concurrency?: number | undefined; | ||
resize?: number | ReadonlyArray<any> | undefined; | ||
} | ||
interface WebpOptions extends DefaultOptions { | ||
readonly outputFormat?: 'webp' | undefined; | ||
readonly outputOptions?: sharp.WebpOptions | undefined; | ||
} | ||
interface JpegOptions extends DefaultOptions { | ||
readonly outputFormat: 'jpeg'; | ||
readonly outputOptions?: sharp.JpegOptions | undefined; | ||
} | ||
interface JpgOptions extends DefaultOptions { | ||
readonly outputFormat: 'jpg'; | ||
readonly outputOptions?: sharp.JpegOptions | undefined; | ||
} | ||
} | ||
declare function lqip(input: string | Buffer, options?: lqip.LqipOptions): Promise<lqip.LqipResult>; | ||
declare function lqip( | ||
input: ReadonlyArray<string> | ReadonlyArray<Buffer>, | ||
options?: lqip.LqipOptions, | ||
): Promise<lqip.LqipResult[]>; | ||
export = lqip; | ||
```` | ||
### Additional Details | ||
* Last updated: Mon, 04 Jan 2021 20:50:21 GMT | ||
* Last updated: Thu, 08 Jul 2021 16:23:51 GMT | ||
* Dependencies: [@types/sharp](https://npmjs.com/package/@types/sharp), [@types/node](https://npmjs.com/package/@types/node) | ||
@@ -14,0 +71,0 @@ * Global values: none |
6219
74