-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
fix(compiler-sfc): improved type resolution for function type aliases #13452
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
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThe changes update the type resolution logic for TypeScript type aliases in Vue's SFC compiler, specifically improving how function type aliases are inferred as runtime Changes
Sequence Diagram(s)sequenceDiagram
participant SFCCompiler
participant TypeResolver
SFCCompiler->>TypeResolver: inferRuntimeType(node: TSTypeReference)
TypeResolver->>TypeResolver: resolve type alias (TSTypeAliasDeclaration)
alt typeAnnotation is TSFunctionType
TypeResolver-->>SFCCompiler: return ['Function']
else other typeAnnotation
TypeResolver->>TypeResolver: recursively infer runtime type
TypeResolver-->>SFCCompiler: return inferred type
end
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Suggested labels
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
close #13444
TSFunctionType
in type aliasesSummary by CodeRabbit
New Features
Tests