Describe the bug
SafeQL throws an error when using type aliases and interfaces, It doesn't recognise them when they are assigned as a type annotation. I am using it with postgres.js
To Reproduce
Steps to reproduce the behavior:
async function query() {
const ids = await sql<{ id: number }[]>`SELECT id FROM animals`;
type Animal = { id: number };
const ids2 = await sql<Animal[]>`SELECT id FROM animals`;
}
Expected behavior
Don't throw an error when the correct type is used
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Owner Name | ts-safeql |
Repo Name | safeql |
Full Name | ts-safeql/safeql |
Language | TypeScript |
Created Date | 2022-09-08 |
Updated Date | 2023-03-16 |
Star Count | 795 |
Watcher Count | 5 |
Fork Count | 14 |
Issue Count | 7 |
Issue Title | Created Date | Updated Date |
---|