Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add LoaderContext to types #13164
feat: add LoaderContext to types #13164
Changes from 3 commits
586d013
a2f8808
df44d7d
79da320
39042a2
b967f36
5ef8aca
3d45e2b
1578fd4
25c80ea
a679319
111e95c
35eef1e
3898b38
481832d
57e49bc
8703248
40a5eb1
8cd30eb
ee03137
cf1a1fe
984308a
e42915c
7cc4078
ea53a23
4e70b37
b71e0ce
5b21dd2
77f625a
87c0d1c
b6693fe
442a1eb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could steal the
Schema
type fromschema-utils
:Parameters<typeof import("schema-utils").validate>[0]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will steal!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at usage it seems these can be
strings
:webpack/lib/NormalModule.js
Line 521 in 85fe6ac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but that's only for backward-compat. The
NonErrorEmittedError
says that you made an error in error reporting... so it should not be in the typingsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same arguments as for
async()
return valueThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
EmptyContextAdditions
is a workaround for a typescript bug. Usually you would sayLoaderDefinition<ContextAdditions = {}>
, but that doesn't work in jsdoc without strict mode, where{}
becomesany
.