Repository navigation
Conversation
|
@mohsen1 Please review the following output log for errors: Show remaining errorsSee complete report here. |
| @@ -0,0 +1,319 @@ | |||
| declare module '*.json'; | |||
| declare module 'webpack-cli'; | |||
| declare module 'tapable' { | |||
There was a problem hiding this comment.
this declaration will go away once DefinitelyTyped/DefinitelyTyped#24527 is merged
There was a problem hiding this comment.
Unfortunately I didn't check it earlier but there are errors in the type definitions. If context is defined, then the first argument is not T1 but the context.
| "simple-git": "^1.65.0", | ||
| "sinon": "^2.3.2", | ||
| "style-loader": "^0.19.1", | ||
| "typescript": "^2.9.0-dev.20180325", |
There was a problem hiding this comment.
maybe its better to start with stable release?
There was a problem hiding this comment.
Fair point. With this work I've seen some bugs in TypeScript itself. Hoping they're fixed in the nightly builds. We should not go to master with a nightly build :)
| let _this = this; | ||
| const start = _this.profile && Date.now(); | ||
| const currentProfile = _this.profile && {}; | ||
| let __this = this; |
There was a problem hiding this comment.
Could you remove this statement and replace _this by this? It should be possible because the code below uses arrow functions
|
|
||
| assignIndex(module) { | ||
| const _this = this; | ||
| const __this = this; |
There was a problem hiding this comment.
Same here. this should be safe thanks to arrow functions.
|
|
||
| this.running = false; | ||
|
|
||
| // Added to make TypeScript happy |
There was a problem hiding this comment.
This type of comment is not needed. Property should always be defined in order to avoid v8 transitions
| }; | ||
| for (let chunkId of Object.keys(records.chunkHashs)) { | ||
| chunkId = isNaN(+chunkId) ? chunkId : +chunkId; | ||
| chunkId = isNaN(+chunkId) ? chunkId : String(+chunkId); |
There was a problem hiding this comment.
chunkId is either a string or number.
| normalModuleFactory.hooks.createGenerator | ||
| .for("javascript/auto") | ||
| .tap("JavascriptModulesPlugin", options => { | ||
| // @ts-ignore Expected 0 arguments, but got 1. |
There was a problem hiding this comment.
Could you fix the constructor instead?
|
|
||
| // TODO: moved from Module.prototype to make TypeScript happy | ||
| // Not sure if this is the right thing to do | ||
| identifier() { |
There was a problem hiding this comment.
These should be properties not methods
| module.exports = function objectToMap(obj) { | ||
| return new Map(Object.keys(obj).map(key => [key, obj[key]])); | ||
| // @ts-ignore | ||
| return new Map(Object.keys(obj).map(key => [key, obj[key]])); |
There was a problem hiding this comment.
nit: Indentation is wrong
|
Closing this PR as I'm making smaller PRs to address all those issues |
This is a follow up PR for #6862 and not intended for merging.