-
I'm looking into creating a TypeBox adapter for sveltekit-superforms, basing it on my typebox-validators library. typebox-validators defines the following class: export abstract class AbstractValidator<S extends TSchema> {
...
} My adapter defines the following function: import type { TObject } from "@sinclair/typebox";
import type { AbstractValidator } from "typebox-validators";
import type { superValidate as superformsSuperValidate } from "sveltekit-superforms/server";
export function superValidate<T extends TObject, M = any>(
validator: AbstractValidator<T>
): ReturnType<typeof superformsSuperValidate<any, M>> {
...
} However, I get the following TS error on the
I get the same error replacing Is this because there will be two definitions of the What is the appropriate way to deal with the problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The problem is that typebox-validators has a dependency on Typebox 0.28.x, whereas Typebox 0.29.x+ is incompatible. I updated typebox-validators to the latest version of Kysely. Spent most of the day tracking this down. Sheesh. |
Beta Was this translation helpful? Give feedback.
The problem is that typebox-validators has a dependency on Typebox 0.28.x, whereas Typebox 0.29.x+ is incompatible.
I updated typebox-validators to the latest version of Kysely. Spent most of the day tracking this down. Sheesh.