-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
chore(dev): check component types in playground.vue #16843
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a94b11b
Add script config
yuwu9145 aad2044
use unplugin-vue-components to generate components.d.ts
yuwu9145 26d33bb
Remove .ts suffix in import path
yuwu9145 c121171
Try to automatically get the full list of compoentns types
yuwu9145 f07ca60
ignore components.d.ts
yuwu9145 60374bb
Adjust eslintignore
yuwu9145 565cc69
add comment
yuwu9145 1a8d927
Merge branch 'master' into type-check-script
KaelWD a83e8e5
use existing eslintignore
KaelWD File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
/build/ | ||
|
||
# playground components type definitions generated by unplugin-vue-components | ||
/dev/components.d.ts | ||
|
||
# Built files | ||
/es5/ | ||
/lib/ | ||
/lib-temp/ | ||
/dist/ | ||
/cypress/ | ||
/cypress/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/dev/Playground.vue | ||
/dev/components.d.ts | ||
/cypress/screenshots | ||
|
||
# Built files | ||
|
This file contains 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
This file contains 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
This file contains 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
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.
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.
To assist
vue-tsc
work properly, have to remove .ts suffix for import paths, so unplugin-vue-components can yieldVBtn: typeof import('@/components/VBtn/index')['VBtn']
👍as opposed to
VBtn: typeof import('@/components/VBtn/index.ts')['VBtn']
👎TS 4.x does not support .ts suffix in import path, and it looks like to be one of tasks in TS 5.x roadmap
Issue: microsoft/TypeScript#37582
PR: microsoft/TypeScript#51669
More importantly, this change does not break
yarn dev