Skip to content

Commit

Permalink
fix: cannot extract vue2 slots type
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jun 5, 2022
1 parent 62f3c89 commit 1630f5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vue-typescript/src/utils/localTypes.ts
Expand Up @@ -54,7 +54,7 @@ export declare function directiveFunction<T>(dir: T):
export type ExtractComponentSlots<T> =
IsAny<T> extends true ? Record<string, any>
: T extends { $slots?: infer S } ? { [K in keyof S]-?: S[K] extends ((obj: infer O) => any) | undefined ? O : S[K] }
: T extends { ${slots}?: infer S } ? { [K in keyof S]-?: S[K] extends ((obj: infer O) => any) | undefined ? O : S[K] }
: Record<string, any>;
export type GetComponentName<T, K extends string> = K extends keyof T ? IsAny<T[K]> extends false ? K : GetComponentName_CamelCase<T, CamelCase<K>> : GetComponentName_CamelCase<T, CamelCase<K>>;
Expand Down

0 comments on commit 1630f5a

Please sign in to comment.