@types/compression-webpack-plugin
Advanced tools
Comparing version 0.4.2 to 2.0.0
@@ -1,42 +0,47 @@ | ||
// Type definitions for compression-webpack-plugin 0.4 | ||
// Type definitions for compression-webpack-plugin 2.0 | ||
// Project: https://github.com/webpack-contrib/compression-webpack-plugin | ||
// Definitions by: Anton Kandybo <https://github.com/dublicator> | ||
// Rhys van der Waerden <https://github.com/rhys-vdw> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.3 | ||
// TypeScript Version: 2.4 | ||
import { Plugin } from 'webpack'; | ||
import { ZlibOptions as ZlibCompressionOptions } from 'zlib'; | ||
export = CompressionPlugin; | ||
declare class CompressionPlugin extends Plugin { | ||
constructor(options?: CompressionPlugin.Options); | ||
declare class CompressionPlugin<O = any> extends Plugin { | ||
constructor(options?: CompressionPlugin.Options<O>); | ||
} | ||
declare namespace CompressionPlugin { | ||
interface Options { | ||
asset?: string; | ||
algorithm?: string; | ||
type AlgorithmCallback = (error: Error | null, result: Buffer) => void; | ||
type Algorithm<O> = (source: string, options: O, callback: AlgorithmCallback) => void; | ||
// NOTE: These are the async compression algorithms on the zlib object. | ||
type ZlibAlgorithm = 'deflate' | 'deflateRaw' | 'gzip'; | ||
type Pattern = string | RegExp | ReadonlyArray<RegExp> | ReadonlyArray<string>; | ||
interface BaseOptions { | ||
cache?: boolean | string; | ||
test?: RegExp | RegExp[]; | ||
regExp?: RegExp | RegExp[]; | ||
deleteOriginalAssets?: boolean; | ||
exclude?: Pattern; | ||
filename?: string; | ||
include?: Pattern; | ||
minRatio?: number; | ||
test?: Pattern; | ||
threshold?: number; | ||
minRatio?: number; | ||
} | ||
// zopfli options | ||
verbose?: boolean; | ||
verbose_more?: boolean; | ||
numiterations?: number; | ||
blocksplitting?: boolean; | ||
blocksplittinglast?: boolean; | ||
blocksplittingmax?: number; | ||
interface ZlibOptions extends BaseOptions { | ||
algorithm?: ZlibAlgorithm; | ||
compressionOptions?: ZlibCompressionOptions; | ||
} | ||
// zlib options | ||
level?: number; | ||
flush?: number; | ||
chunkSize?: number; | ||
windowBits?: number; | ||
memLevel?: number; | ||
strategy?: number; | ||
dictionary?: any; | ||
interface CustomOptions<O> extends BaseOptions { | ||
algorithm: Algorithm<O>; | ||
compressionOptions?: O; | ||
} | ||
type Options<O> = ZlibOptions | CustomOptions<O>; | ||
} |
{ | ||
"name": "@types/compression-webpack-plugin", | ||
"version": "0.4.2", | ||
"version": "2.0.0", | ||
"description": "TypeScript definitions for compression-webpack-plugin", | ||
@@ -11,8 +11,14 @@ "license": "MIT", | ||
"githubUsername": "dublicator" | ||
}, | ||
{ | ||
"name": "Rhys van der Waerden", | ||
"url": "https://github.com/rhys-vdw", | ||
"githubUsername": "rhys-vdw" | ||
} | ||
], | ||
"main": "", | ||
"types": "index", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
}, | ||
@@ -23,4 +29,4 @@ "scripts": {}, | ||
}, | ||
"typesPublisherContentHash": "68aaffd7cf8a4a4a5210ce67d3efa4fb507aefa7923d236c283c02b8cf61c92b", | ||
"typeScriptVersion": "2.3" | ||
"typesPublisherContentHash": "d1be23e10fe182b0ab8de65c56c3ff3cae9275aa55614d5f76672432e2cad0c4", | ||
"typeScriptVersion": "2.4" | ||
} |
@@ -8,10 +8,10 @@ # Installation | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/compression-webpack-plugin | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/compression-webpack-plugin | ||
Additional Details | ||
* Last updated: Sat, 10 Mar 2018 02:17:46 GMT | ||
* Dependencies: webpack | ||
* Last updated: Sat, 15 Dec 2018 00:17:45 GMT | ||
* Dependencies: @types/webpack | ||
* Global values: none | ||
# Credits | ||
These definitions were written by Anton Kandybo <https://github.com/dublicator>. | ||
These definitions were written by Anton Kandybo <https://github.com/dublicator>, Rhys van der Waerden <https://github.com/rhys-vdw>. |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4319
38
1