Skip to content

Commit

Permalink
chore: Upgrade typescript to 2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jantimon committed Jun 3, 2018
1 parent 2439012 commit c6f0f5a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
19 changes: 9 additions & 10 deletions index.js
@@ -1,15 +1,14 @@
// @ts-check
'use strict';

// use Polyfill for util.promisify in node versions < v8
const promisify = require('util.promisify');

// Import types
/* eslint-disable */
/// <reference path="./typings.d.ts" />
/* eslint-enable */
/** @typedef {import("webpack/lib/Compiler.js")} WebpackCompiler */
/** @typedef {import("webpack/lib/Compilation.js")} WebpackCompilation */
'use strict';

// use Polyfill for util.promisify in node versions < v8
const promisify = require('util.promisify');

const vm = require('vm');
const fs = require('fs');
Expand All @@ -33,10 +32,8 @@ class HtmlWebpackPlugin {
*/
constructor (options) {
// Default options
/**
* @type {HtmlWebpackPluginOptions}
*/
this.options = Object.assign({
/** @type {HtmlWebpackPluginOptions} */
const defaultOptions = {
template: path.join(__dirname, 'default_index.ejs'),
templateContent: false,
templateParameters: templateParametersGenerator,
Expand All @@ -54,7 +51,9 @@ class HtmlWebpackPlugin {
meta: {},
title: 'Webpack App',
xhtml: false
}, options);
};
/** @type {HtmlWebpackPluginOptions} */
this.options = Object.assign(defaultOptions, options);
// Instance variables to keep caching information
// for multiple builds
this.childCompilerHash = undefined;
Expand Down
6 changes: 0 additions & 6 deletions lib/chunksorter.js
Expand Up @@ -2,12 +2,6 @@
/** @typedef {import("webpack/lib/Compilation.js")} WebpackCompilation */
'use strict';

// Import webpack types using commonjs
// As we use only the type we have to prevent warnings about unused varaibles
/* eslint-disable */
const WebpackCompilation = require('webpack/lib/Compilation');
/* eslint-enable */

/**
* @type {{[sortmode: string] : (entryPointNames: Array<string>, compilation, htmlWebpackPluginOptions) => Array<string> }}
* This file contains different sort methods for the entry chunks names
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -12,7 +12,7 @@
],
"scripts": {
"pretest": "semistandard",
"posttest": "tsc --pretty",
"posttest": "tsc",
"commit": "git-cz",
"build-examples": "node examples/build-examples.js",
"test": "jasmine",
Expand Down Expand Up @@ -41,7 +41,7 @@
"semistandard": "8.0.0",
"standard-version": "^4.3.0",
"style-loader": "^0.13.1",
"typescript": "2.9.0-dev.20180518",
"typescript": "2.9.1",
"underscore-template-loader": "^0.7.3",
"url-loader": "^0.5.7",
"webpack": "4.8.3",
Expand Down

0 comments on commit c6f0f5a

Please sign in to comment.