mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-31 19:36:46 -05:00
fix(vue): failing hook type (#1207)
* fix: type vue clients to a functions * chore: typefix
This commit is contained in:
@@ -183,7 +183,9 @@ describe("type", () => {
|
||||
},
|
||||
},
|
||||
});
|
||||
expectTypeOf(client.useComputedAtom).toEqualTypeOf<Readonly<Ref<number>>>();
|
||||
expectTypeOf(client.useComputedAtom).toEqualTypeOf<
|
||||
() => Readonly<Ref<number>>
|
||||
>();
|
||||
});
|
||||
it("should infer resolved hooks svelte", () => {
|
||||
const client = createSvelteClient({
|
||||
|
||||
@@ -33,7 +33,9 @@ type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<
|
||||
? never
|
||||
: key extends string
|
||||
? `use${Capitalize<key>}`
|
||||
: never]: DeepReadonly<Ref<ReturnType<Atoms[key]["get"]>>>;
|
||||
: never]: () => DeepReadonly<
|
||||
Ref<ReturnType<Atoms[key]["get"]>>
|
||||
>;
|
||||
}
|
||||
: {}
|
||||
: {}
|
||||
|
||||
Reference in New Issue
Block a user