-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): update changeset for ESService change
- Loading branch information
1 parent
0d14f7d
commit 01e48f4
Showing
1 changed file
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
--- | ||
'@freshgum/typedi': major | ||
'@freshgum/typedi': minor | ||
--- | ||
|
||
The `ESService` decorator now supports classes with static properties. | ||
This was an oversight in the original design of the decorator's signature. | ||
|
||
**This is a breaking change**, as it affects the type parameters consumed by `ESService`; | ||
the main difference being that there is now a second parameter, `TClass`, which directly | ||
pertains to the type of the class being decorated (and thus, the type returned by the decorator.) | ||
This change affects the type parameters consumed by `ESService`; the main difference | ||
being that there is now a second parameter, `TClass`, which directly pertains to the | ||
type of the class being decorated (and thus, the type returned by the decorator.) | ||
|
||
Therefore, the type parameters of the function have changed from [`T = unknown`][esservice-old-type-params] | ||
to [`TInstance, TClass extends Constructable<TInstance> = Constructable<TInstance>`][esservice-new-type-params]. | ||
to [`TInstance = unknown, TClass extends Constructable<TInstance> = Constructable<TInstance>`][esservice-new-type-params]. | ||
|
||
Any calls to `ESService` without the usage of its' type parameters should not be affected by this change. | ||
Current code which relies on the type signature of `ESService` will not be affected. | ||
|
||
|
||
[esservice-old-type-params]: https://github.com/freshgum-bubbles/typedi/blob/4c76133d3a94e119d5b4d44846213df42d3010a5/src/contrib/es/es-service.decorator.mts#L38 | ||
[esservice-new-type-params]: https://github.com/freshgum-bubbles/typedi/blob/a3825b77fadf6143f282e5cf4b68c084076b8369/src/contrib/es/es-service.decorator.mts#L38 |