Effect CommunityEC
Effect Community2y ago
6 replies
whatplan

Handling JSON Columns in TypeScript with PostgreSQL: Use `ts-expect-error`

what is the reccomendation for setting json columns?
Sql.schema.void({
    Request: S.Struct({ settings: S.Struct({ ...}) }),
    execute: (request) => sql`UPDATE todos SET settings = ${request.settings}`,
                                                           // ^ type _ is not assignable to argument
  });


the postgres driver handlers the encoding and decoding, so it works
just ts-expect-error?
Was this page helpful?