Skip to content

Commit

Permalink
fix: slot props fall back to any if component no slots type
Browse files Browse the repository at this point in the history
close #2646
  • Loading branch information
johnsoncodehk committed Apr 21, 2023
1 parent d3377df commit c97ed08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vue-language-core/src/utils/localTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export type GlobalComponents =
>;
export declare function getVForSourceType<T>(source: T): ForableSource<NonNullable<T extends number ? number[] : T extends string ? string[] : T>>;
export declare function getSlotParams<T>(slot: T): Parameters<NonNullable<T>>;
export declare function getSlotParam<T>(slot: T): Parameters<NonNullable<T>>[0];
export declare function getSlotParams<T>(slot: T): Parameters<PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
export declare function getSlotParam<T>(slot: T): Parameters<PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
export declare function directiveFunction<T>(dir: T):
T extends ObjectDirective<infer E, infer V> ? undefined extends V ? (value?: V) => void : (value: V) => void
: T extends FunctionDirective<infer E, infer V> ? undefined extends V ? (value?: V) => void : (value: V) => void
Expand Down
7 changes: 7 additions & 0 deletions packages/vue-test-workspace/vue-tsc/#2646/main.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template>
<foo>
<template #default="{ row }">
{{ row }}
</template>
</foo>
</template>

0 comments on commit c97ed08

Please sign in to comment.