Type Error When Using @effect/sql with PgClient Layer Configuration

hello! I'm introducing @effect/sql to my codebase using the example from https://www.npmjs.com/package/@effect/sql, but the following code:

const SqlLive = PgClient.layer({
  database: Config.succeed('DATABASE_URL'),
});


gives me this type error in the database key:

Type 'Config<string>' is missing the following properties from type 'Config<string | undefined>': [ConfigTypeId], [EffectTypeId], [SinkTypeId], [StreamTypeId], [ChannelTypeId]ts(2739)


I feel like I'm missing something simple but can't find what is it
Was this page helpful?