Skip to content

Commit

Permalink
More comment based type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohsen Azimi authored and sokra committed Apr 12, 2018
1 parent 3ac4f21 commit 09cdcb0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
20 changes: 11 additions & 9 deletions declarations.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
declare module '*.json';
declare module 'webpack-cli';
declare module "*.json";
declare module "webpack-cli";

// Globals
declare const $hash$;
Expand All @@ -10,11 +10,13 @@ declare const hotDownloadManifest;
declare const hotDownloadUpdateChunk;
declare const hotDisposeChunk;
declare const modules;
declare const installedChunks
declare const hotAddUpdateChunk
declare const parentHotUpdateCallback
declare const installedChunks;
declare const hotAddUpdateChunk;
declare const parentHotUpdateCallback;
// declare const XMLHttpRequest
declare const $hotChunkFilename$
declare const $hotMainFilename$
declare const $WebAssembly
declare const WebAssembly
declare const $hotChunkFilename$;
declare const $hotMainFilename$;
declare const $WebAssembly;
declare const WebAssembly;
declare const importScripts;
declare const $crossOriginLoading$;
2 changes: 1 addition & 1 deletion lib/util/objectToMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
* @returns {Map} an ES6 Map of KV pairs
*/
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]])));
};
1 change: 1 addition & 0 deletions lib/webpack.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"code-lint": "eslint setup lib bin hot buildin \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"",
"tsc": "tsc --pretty",
"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",
"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",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* Basic Options */
"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'. */
"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. */
"checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
Expand Down

0 comments on commit 09cdcb0

Please sign in to comment.