Skip to content

Commit

Permalink
fix: directives argument should be optional if argument could be unde…
Browse files Browse the repository at this point in the history
…fined

close #1040
  • Loading branch information
johnsoncodehk committed Mar 20, 2022
1 parent 96a5872 commit 3462c8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vue-typescript/src/utils/localTypes.ts
Expand Up @@ -62,8 +62,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 getNameOption<T>(t?: T): T extends { name: infer N } ? N : undefined;
export declare function directiveFunction<T>(dir: T):
T extends ObjectDirective<infer E, infer V> ? (value: V) => void
: T extends FunctionDirective<infer E, infer V> ? (value: V) => void
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
: T;
export type TemplateSlots<T> = T extends { __VLS_slots: infer S } ? S : {};
Expand Down

0 comments on commit 3462c8d

Please sign in to comment.