More comment based type fixes

This commit is contained in:
Mohsen Azimi 2018-03-28 21:24:34 -07:00 committed by Tobias Koppers
parent 3ac4f216c1
commit 09cdcb0661
5 changed files with 15 additions and 12 deletions

20
declarations.d.ts vendored
View File

@ -1,5 +1,5 @@
declare module '*.json'; declare module "*.json";
declare module 'webpack-cli'; declare module "webpack-cli";
// Globals // Globals
declare const $hash$; declare const $hash$;
@ -10,11 +10,13 @@ declare const hotDownloadManifest;
declare const hotDownloadUpdateChunk; declare const hotDownloadUpdateChunk;
declare const hotDisposeChunk; declare const hotDisposeChunk;
declare const modules; declare const modules;
declare const installedChunks declare const installedChunks;
declare const hotAddUpdateChunk declare const hotAddUpdateChunk;
declare const parentHotUpdateCallback declare const parentHotUpdateCallback;
// declare const XMLHttpRequest // declare const XMLHttpRequest
declare const $hotChunkFilename$ declare const $hotChunkFilename$;
declare const $hotMainFilename$ declare const $hotMainFilename$;
declare const $WebAssembly declare const $WebAssembly;
declare const WebAssembly declare const WebAssembly;
declare const importScripts;
declare const $crossOriginLoading$;

View File

@ -6,5 +6,5 @@
* @returns {Map} an ES6 Map of KV pairs * @returns {Map} an ES6 Map of KV pairs
*/ */
module.exports = function objectToMap(obj) { module.exports = function objectToMap(obj) {
return new Map(Object.keys(obj).map(key => [key, obj[key]])); return new Map(Object.keys(obj).map(key => /** @type [string, string] */([key, obj[key]])));
}; };

View File

@ -1,3 +1,4 @@
// @ts-nocheck
/* /*
MIT License http://www.opensource.org/licenses/mit-license.php MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra Author Tobias Koppers @sokra

View File

@ -112,7 +112,7 @@
"code-lint": "eslint setup lib bin hot buildin \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"", "code-lint": "eslint setup lib bin hot buildin \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"",
"tsc": "tsc --pretty", "tsc": "tsc --pretty",
"fix": "yarn code-lint --fix", "fix": "yarn code-lint --fix",
"pretty": "prettier \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\" --write", "pretty": "prettier \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\" \"declarations.d.ts\" --write",
"schema-lint": "mocha test/*.lint.js --opts test/lint-mocha.opts", "schema-lint": "mocha test/*.lint.js --opts test/lint-mocha.opts",
"benchmark": "mocha --max-old-space-size=4096 --harmony --trace-deprecation test/*.benchmark.js -R spec", "benchmark": "mocha --max-old-space-size=4096 --harmony --trace-deprecation test/*.benchmark.js -R spec",
"cover": "yarn cover:init && yarn cover:all && yarn cover:report", "cover": "yarn cover:init && yarn cover:all && yarn cover:report",

View File

@ -3,7 +3,7 @@
/* Basic Options */ /* Basic Options */
"target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ "target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es2017"], /* Specify library files to be included in the compilation. */ "lib": ["es2017", "dom"], /* Specify library files to be included in the compilation. */
"allowJs": true, /* Allow javascript files to be compiled. */ "allowJs": true, /* Allow javascript files to be compiled. */
"checkJs": true, /* Report errors in .js files. */ "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */