Closed
Conversation
# Conflicts: # packages/runtime-core/src/componentOptions.ts
# Conflicts: # packages/runtime-core/src/componentOptions.ts
|
Since in Volar 0.34.0, original typed slot support has been removed because of performance reason, could we move this PR forward. I feel this is the last piece of Vue TypeScript tooling support. It's a big pain for any large scale Vue project. |
# Conflicts: # packages/compiler-sfc/src/cssVars.ts # packages/dts-test/defineComponent.test-d.tsx # packages/runtime-core/src/apiDefineComponent.ts # packages/runtime-core/src/component.ts # packages/runtime-core/src/componentOptions.ts # packages/runtime-core/src/componentPublicInstance.ts # packages/runtime-core/src/scheduler.ts
pikax
commented
Feb 21, 2023
Comment on lines
+1561
to
+1570
| // TODO review this part | ||
| if (slotsTypeDecl) { | ||
| const content = slotsTypeDecl.__fromNormalScript | ||
| ? script!.content | ||
| : scriptSetup.content | ||
| args += `: { slots: (${content.slice( | ||
| slotsTypeDecl.start!, | ||
| slotsTypeDecl.end! | ||
| )}), expose: any, emit: any, attrs: any }` | ||
| } |
Member
Author
There was a problem hiding this comment.
Not sure about this, this seems that might cause an issue when we have both slot and emit
Member
Author
|
@yyx990803 Do you mind reviewing this PR? I need some help on the compiler macro for and #2693 (comment) |
pikax
commented
Feb 21, 2023
Comment on lines
+743
to
+747
| slots: null as unknown as { | ||
| default: { | ||
| Component: ComponentPublicInstance | ||
| } | ||
| }, |
Member
Author
There was a problem hiding this comment.
strict behaviour by default, this behaviour is a breaking change, I can make it less strict if needed
Member
|
Very grateful for your PR. I didn't even notice this PR before #7982. So I close this. |
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.
Allow type slots: vuejs/rfcs#192