diff --git a/lib/DefinePlugin.js b/lib/DefinePlugin.js index cb1835d77..a99cb9a76 100644 --- a/lib/DefinePlugin.js +++ b/lib/DefinePlugin.js @@ -11,6 +11,7 @@ const NullFactory = require("./NullFactory"); /** @typedef {import("./Compiler")} Compiler */ /** @typedef {import("./Parser")} Parser */ +/** @typedef {null|undefined|RegExp|Function|Object} CodeValue */ class RuntimeValue { constructor(fn, fileDependencies) { @@ -42,7 +43,7 @@ const stringifyObj = (obj, parser) => { /** * Convert code to a string that evaluates - * @param {null|undefined|RegExp|Function|Object} code Code to evaluate + * @param {CodeValue} code Code to evaluate * @param {Parser} parser Parser * @returns {string} code converted to string that evaluates */ @@ -99,13 +100,13 @@ class DefinePlugin { /** * Handler - * @param {TODO} parser Parser + * @param {Parser} parser Parser * @returns {void} */ const handler = parser => { /** * Walk definitions - * @param {TODO} definitions Definitions map + * @param {Object} definitions Definitions map * @param {string} prefix Prefix string * @returns {void} */ @@ -146,7 +147,7 @@ class DefinePlugin { /** * Apply Code * @param {string} key Key - * @param {TODO} code Code + * @param {CodeValue} code Code * @returns {void} */ const applyDefine = (key, code) => { diff --git a/package.json b/package.json index 44ac63915..4c8987374 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "script-loader": "~0.7.0", "simple-git": "^1.65.0", "style-loader": "^0.19.1", - "typescript": "^2.9.1", + "typescript": "^3.0.0-dev.20180622", "url-loader": "^0.6.2", "val-loader": "^1.0.2", "vm-browserify": "~0.0.0", diff --git a/yarn.lock b/yarn.lock index 037df12f4..564a6a30d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6502,9 +6502,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^2.9.1: - version "2.9.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" +typescript@^3.0.0-dev.20180622: + version "3.0.0-dev.20180622" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.0-dev.20180622.tgz#16cb2d9cd90cda892810439f75b0b92762b8e745" ua-parser-js@^0.7.9: version "0.7.18"