Skip to content

Commit

Permalink
feat: extract slots type with keyof JSX.ElementChildrenAttribute
Browse files Browse the repository at this point in the history
close #2472
  • Loading branch information
johnsoncodehk committed Mar 26, 2023
1 parent 7cd49ab commit 7519fde
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/vue-language-core/src/utils/localTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export type ExtractComponentSlots<T> =
IsAny<T> extends true ? Record<string, any>
: T extends { ${slots}?: infer S } ? S
: T extends { children?: infer S } ? S
: T extends { [K in keyof JSX.ElementChildrenAttribute]?: infer S } ? S
: Record<string, any>;
export type FillingEventArg_ParametersLength<E extends (...args: any) => any> = IsAny<Parameters<E>> extends true ? -1 : Parameters<E>['length'];
Expand Down Expand Up @@ -135,8 +136,6 @@ export type EventObject<I, K1 extends string, C, E1> = {
>
>
};
type IntrinsicElements = JSX.IntrinsicElements;
`.trim();
}

Expand Down

0 comments on commit 7519fde

Please sign in to comment.