breejs / bree

Bree is a Node.js and JavaScript job task scheduler with worker threads, cron, Date, and human syntax. Built for @ladjs, @forwardemail, @spamscanner, @cabinjs.
https://jobscheduler.net
MIT License
2.96k stars 80 forks source link

[fix] cannot extends types #232

Closed climba03003 closed 8 months ago

climba03003 commented 8 months ago

Describe the bug

Node.js version: *

OS version: *

Description: https://github.com/breejs/bree/commit/8482d166d0ed2c57e9eed21dd49fefd8370ce90c is trying to fix the lint error, but it produce a breaking change to the TypeScript user. It changes all interface to type which are not allow to do declaration merging.

Actual behavior

Not able to do so.

Expected behavior

Allow declaration merging.

Code to reproduce

TypeScript allow declaration merging to extends the types of packages. It allow the ability to create plugins and extends it's original types. For example, I would like to add a property foo to the job.

declare module 'bree' {
  interface Job {
    foo: string
  }
}

Checklist

climba03003 commented 8 months ago

cc @titanism

titanism commented 8 months ago

just deprecated v9.2.0, sec

titanism commented 8 months ago

ok, fixed, v9.2.1 released

https://github.com/breejs/bree/releases/tag/v9.2.1

climba03003 commented 8 months ago

Thanks for quick response.

titanism commented 8 months ago

ofc @climba03003 – we use bree at https://forwardemail.net btw 🙏