Skip to content
This repository was archived by the owner on Mar 16, 2020. It is now read-only.

Add TypeScript declarations to support Webpack configurations written in TypeScript as well#86

Open
jsievenpiper wants to merge 1 commit intowebpack-contrib:masterfrom
jsievenpiper:master
Open

Add TypeScript declarations to support Webpack configurations written in TypeScript as well#86
jsievenpiper wants to merge 1 commit intowebpack-contrib:masterfrom
jsievenpiper:master

Conversation

@jsievenpiper
Copy link
Copy Markdown

This PR adds a simple start at hashing out the simpler parts of declaring TypeScript interfaces for consumers of babel-minify-webpack-plugin. This allows end-users to leverage this plugin in a TypeScript-authored Webpack config file:

import { Plugin } from 'webpack';
import Minify from 'babel-minify-webpack-plugin';

const plugins: Plugin[] = [ new Minify() ];

There were a couple cases where the plugin was being extremely robust to support just about any value passed in as a fallback (typically via boolean coercion) that isn't explicitly listed in the types (otherwise they'd fall down to TypeScript's any).

@jsf-clabot
Copy link
Copy Markdown

jsf-clabot commented Mar 14, 2019

CLA assistant check
All committers have signed the CLA.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants