Skip to content

Commit

Permalink
fix: Pick up the correct slot scope type from $slots
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufkandemir committed Sep 29, 2021
1 parent 0adcbbd commit 9f9cda6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vscode-vue-languageservice/src/utils/globalDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ declare global {
: T extends FunctionDirective<infer E, infer V> ? V extends { value: infer V_2 } ? (value: V_2) => void : (value: V) => void : T;
function __VLS_getTemplateSlots<T>(t: T): T extends { __VLS_slots: infer S } ? S : {};
function __VLS_getScriptSlots<T>(t: T): T extends new (...args: any) => { $slots?: infer S } ? (S extends object ? S : {}) : {};
type __VLS_SlotScopeType<T> = T extends vue_3.Slot ? Parameters<T>[0] : undefined;
function __VLS_getScriptSlots<T>(t: T): T extends new (...args: any) => { $slots?: infer S }
? S extends vue_3.Slots ? Record<keyof S, __VLS_SlotScopeType<S[keyof S]>> : {}
: {};
type __VLS_GetComponentName<T, K extends string> = K extends keyof T ? IsAny<T[K]> extends false ? K : __VLS_GetComponentName_CamelCase<T, CamelCase<K>> : __VLS_GetComponentName_CamelCase<T, CamelCase<K>>;
type __VLS_GetComponentName_CamelCase<T, K extends string> = K extends keyof T ? IsAny<T[K]> extends false ? K : __VLS_GetComponentName_CapitalCase<T, Capitalize<K>> : __VLS_GetComponentName_CapitalCase<T, Capitalize<K>>;
Expand Down

0 comments on commit 9f9cda6

Please sign in to comment.