drizzle-typebox infers integer() as TString

I've tried it on Github Codespaces and my machine, both times the types are inferred wrong. Is anyone else dealing with this?
Here's the code:
import * as t from '@sinclair/typebox';

import { createSchemaFactory } from 'drizzle-typebox';
import { integer, pgTable, text } from 'drizzle-orm/pg-core';
import type { __String } from 'typescript';

export const contactTable = pgTable('contact', {
  id: integer().primaryKey().generatedAlwaysAsIdentity(),
  name: text().notNull(),
  email: text(),
  phone: text(),
  title: text(),
});


const { createInsertSchema, createSelectSchema } = createSchemaFactory({
  typeboxInstance: t,
});

const _iS = createInsertSchema(contactTable, {
  email: t.String({ format: 'email' }),
});


type Test = typeof _iS.static;
image.png
Was this page helpful?