nemmind1N
Denoβ€’8mo agoβ€’
5 replies
nemmind1

Deno check fail

Hi, I'm trying to use the effect packages with deno, most of them are working, but the sql-drizzle package don't:

{
  "imports": {
    "@effect/sql-drizzle": "npm:@effect/sql-drizzle@^0.34.3",
    "drizzle-orm": "npm:drizzle-orm@^0.43.1",
    "effect": "npm:effect@^3.15.2"
  }
}


import { Effect } from 'effect'
import { integer, sqliteTable } from 'drizzle-orm/sqlite-core'
import { SqliteDrizzle } from "@effect/sql-drizzle/Sqlite"

const myTable = sqliteTable('foobar', {
  id: integer().primaryKey(),
})

Effect.gen(function* () {
  const db = yield* SqliteDrizzle
  db.select().from(myTable) // This fails
})


This is the error message: once it references the common.d.ts another the common.d.cts file of the same package and it does not know they are the same.
                  Type 'import("file:///home/XXX/.cache/deno/npm/registry.npmjs.org/drizzle-orm/0.43.1/sqlite-core/columns/common.d.ts").SQLiteColumn<any, {}, {}>' is not assignable to type 'import("file:///home/XXX/.cache/deno/npm/registry.npmjs.org/drizzle-orm/0.43.1/sqlite-core/columns/common.d.cts").SQLiteColumn<any, {}, {}>'.
                    Property 'config' is protected but type 'Column<T, TRuntimeConfig, TTypeConfig>' is not a class derived from 'Column<T, TRuntimeConfig, TTypeConfig>'.
  db.select().from(myTable)


This works with node+typescript.

Please help me find out is this a deno bug, or an effect bug.

Thanks!
Was this page helpful?