fix(types): add missing options parameter to importMeta#6433
Merged
patak-cat merged 1 commit intovitejs:mainfrom Jan 11, 2022
Merged
fix(types): add missing options parameter to importMeta#6433patak-cat merged 1 commit intovitejs:mainfrom
patak-cat merged 1 commit intovitejs:mainfrom
Conversation
Shinigami92
approved these changes
Jan 11, 2022
bluwy
approved these changes
Jan 11, 2022
patak-cat
approved these changes
Jan 11, 2022
jeffydc
reviewed
Jan 11, 2022
| glob(pattern: string): Record< | ||
| glob( | ||
| pattern: string, | ||
| options?: AssertOptions |
Contributor
There was a problem hiding this comment.
Sorry for the late review. But we can't import types in this ambient type module. It will fail to provide completion for Vite client types. So we need to import like import('../src/node/importGlob').AssertOptions.
Contributor
There was a problem hiding this comment.
Also can we have ESLint warns about type importing? I couldn't find like /* eslint-warn @typescript-eslint/consistent-type-imports */
Member
There was a problem hiding this comment.
@ydcjeff thanks for being on top of this, would you make a PR with the needed changes?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The new feature to import as raw was merged but IDE will display an error because the typings only accept the pattern and don't allow the options. #5545
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).