You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: the types for output are defined as Stats* because the types are merged together into the root level types.d.ts which might cause issues with other definitions. I know we could use namespaces, but I don't believe that is possible without fully converting to TypeScript itself.
Did you add tests for your changes?
No as it's primarily compile time based, so difficult to add tests. How I've tested this:
Locally modified tests/Stats.test.js so that I captured the output of the toJson call into a file
Locally apply the output to a JS file and do the type cast to verify it's correct.
Does this PR introduce a breaking change?
No.
What needs to be documented once your changes are merged?
In @types/webpack@^4 we would originally get the structure of the JSON output as webpack.Stats.ToJsonOutput.
In version 5, we would now do webpack.StatsCompilation.
The text was updated successfully, but these errors were encountered:
A pull request by @davidhouweling was merged and maintainers requested a documentation change.
See pull request: webpack/webpack#12228
What kind of change does this PR introduce?
Add typings matching the JSON output.
Note: the types for output are defined as
Stats*
because the types are merged together into the root leveltypes.d.ts
which might cause issues with other definitions. I know we could use namespaces, but I don't believe that is possible without fully converting to TypeScript itself.Did you add tests for your changes?
No as it's primarily compile time based, so difficult to add tests. How I've tested this:
tests/Stats.test.js
so that I captured the output of thetoJson
call into a fileDoes this PR introduce a breaking change?
No.
What needs to be documented once your changes are merged?
In
@types/webpack@^4
we would originally get the structure of the JSON output aswebpack.Stats.ToJsonOutput
.In version 5, we would now do
webpack.StatsCompilation
.The text was updated successfully, but these errors were encountered: