Open
Description
Hi, we have just tried to create a type (from the database table) using drizzle, which we have defined as an endpoint.
This can be used as a simple variable, but not within a promise statement.
type test = Pick<InferSelectModel<typeof users>, "id" | "entity_id">;
async (): Promise<test> => { <-- doesn't work
const t: test = { <-- work
id: 1,
entity_id: 1,
};
also got the errors if I try to run encore:
import { InferSelectModel } from "drizzle-orm";
| ^^^^^^^^^^^^^^^^
error: unknown identifier
type test = Pick<InferSelectModel<typeof users>, "id" | "entity_id">;
| ^^^^^^^^^^^^^^^^
error: unsupported indexed access type operation: obj Basic(
Never,
) index Literal(
String(
"id",
),
)
error: unsupported indexed access type operation: obj Basic(
Never,
) index Literal(
String(
"entity_id",
),
)
Metadata
Metadata
Assignees
Labels
No labels