timgit / pg-boss

Queueing jobs in Postgres from Node.js like a boss
MIT License
1.95k stars 153 forks source link

[TypeScript] PgBoss class definition doesn't have a few properties such as config, db, etc. #304

Closed limdauto closed 2 years ago

limdauto commented 2 years ago

Hi,

Thank you for the excellent package. I have a small use case where I need to execute a custom SQL command on the job table. It works fine at runtime but TypeScript isn't very happy when I tried to access config (so I can access the schema) and db on a PgBoss instance. Seems like they are not available on the type definition here: https://github.com/timgit/pg-boss/blob/master/types.d.ts#L247 -- wonder if this is intentional?

timgit commented 2 years ago

Yes, this is intentional. You can run sql commands directly against the job table if needed.