We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I run latest build with updated slonik I get this typescript error:
Cannot find module 'slonik/dist/src/types' or its corresponding type declarations.
I have emulated your code locally and just discovered the type has changed from: SqlTaggedTemplate to SqlTag Just replace this in your code fixes it:
declare module "fastify" { interface FastifyRequest { slonik: { connect: (connectionRoutine: ConnectionRoutine) => Promise; pool: DatabasePool; query: QueryFunction; }; sql: SqlTag<Record<never, never>>; }
interface FastifyInstance { slonik: { connect: (connectionRoutine: ConnectionRoutine) => Promise; pool: DatabasePool; query: QueryFunction; }; sql: SqlTag<Record<never, never>>; } }
The text was updated successfully, but these errors were encountered:
I tried doing that, but there seems to be even more changes in both Slonik and fastify when it comes to such a middleware and it isn't working
Sorry, something went wrong.
No branches or pull requests
When I run latest build with updated slonik I get this typescript error:
I have emulated your code locally and just discovered the type has changed from: SqlTaggedTemplate to SqlTag
Just replace this in your code fixes it:
declare module "fastify" {
interface FastifyRequest {
slonik: {
connect: (connectionRoutine: ConnectionRoutine) => Promise;
pool: DatabasePool;
query: QueryFunction;
};
sql: SqlTag<Record<never, never>>;
}
interface FastifyInstance {
slonik: {
connect: (connectionRoutine: ConnectionRoutine) => Promise;
pool: DatabasePool;
query: QueryFunction;
};
sql: SqlTag<Record<never, never>>;
}
}
The text was updated successfully, but these errors were encountered: