Skip to content

Commit

Permalink
chore(ci): add changelog for ES decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
freshgum-bubbles committed Nov 29, 2023
1 parent 13ca96c commit 268d76a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .changeset/forty-experts-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@freshgum/typedi': minor
---

**We now support ES decorators**! Grab the new ESService decorator from contrib/es!

To use this, you'll need to disable `experimentalDecorators` in your TypeScript
configuration file. Note that, by doing this, you won't be able to utilise the
legacy decorators included in the package (`Service`).

Here's an example:

```ts
import { ESService } from '@freshgum/typedi/contrib/es';

@ESService([ ])
export class MyService { }
```

Note that the **legacy decorators have not been removed** for backwards-compatibility
reasons: you're still able to use them just as before.

Many thanks to Axel Rauschmayer for providing
[a very detailed guide re: ES decorators](https://2ality.com/2022/10/javascript-decorators.html).

0 comments on commit 268d76a

Please sign in to comment.