Skip to content

Commit

Permalink
fix: looser props type extract
Browse files Browse the repository at this point in the history
close #2007
  • Loading branch information
johnsoncodehk committed Oct 15, 2022
1 parent d2c9064 commit e5f1283
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vue-language-tools/vue-language-core/src/utils/localTypes.ts
Expand Up @@ -64,8 +64,8 @@ export type FillingEventArg_ParametersLength<E extends (...args: any) => any> =
export type FillingEventArg<E> = E extends (...args: any) => any ? FillingEventArg_ParametersLength<E> extends 0 ? ($event?: undefined) => ReturnType<E> : E : E;
export type ExtractProps<T> =
T extends (...args: any) => { props: infer Props } ? Props
: T extends new (...args: any) => { $props: infer Props } ? Props
T extends (...args: any) => any ? (T extends (...args: any) => { props: infer Props } ? Props : {})
: T extends new (...args: any) => any ? (T extends new (...args: any) => { $props: infer Props } ? Props : {})
: T; // IntrinsicElement
export type ReturnVoid<T> = T extends (...payload: infer P) => any ? (...payload: P) => void : (...args: any) => void;
export type EmitEvent2<F, E> =
Expand Down

0 comments on commit e5f1283

Please sign in to comment.