Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
feat: add typescript declaration file (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
yisraelx authored and TrySound committed Jun 30, 2019
1 parent 1ba2b88 commit d1d5a61
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions index.d.ts
@@ -0,0 +1,26 @@
import { Plugin } from 'rollup';
import { MinifyOptions } from 'terser';

export interface Options extends MinifyOptions {

/**
* Specifically include/exclude chunk files names (minimatch pattern, or array of minimatch patterns), By default all chunk files will be minify.
*/
include?: Array<string | RegExp> | string | RegExp | null;
exclude?: Array<string | RegExp> | string | RegExp | null;

/**
* Amount of workers to spawn. Defaults to the number of CPUs minus 1.
*/
numWorkers?: number;

/**
* Generates source maps and passes them to rollup.
*
* @default true
*/
sourcemap?: boolean;

}

export declare function terser(options?: Options): Plugin;
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -3,8 +3,10 @@
"version": "5.0.0",
"description": "Rollup plugin to minify generated es bundle",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.js",
"index.d.ts",
"transform.js"
],
"scripts": {
Expand Down

0 comments on commit d1d5a61

Please sign in to comment.