@tsed/di 8.0.0-beta.3 → 8.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -7
- package/readme.md +2 -4
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/di",
|
|
3
3
|
"description": "DI module for Ts.ED Framework",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.0.0-beta.
|
|
5
|
+
"version": "8.0.0-beta.5",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"uuid": "^10.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@tsed/barrels": "8.0.0-beta.
|
|
33
|
-
"@tsed/core": "8.0.0-beta.
|
|
32
|
+
"@tsed/barrels": "8.0.0-beta.5",
|
|
33
|
+
"@tsed/core": "8.0.0-beta.5",
|
|
34
34
|
"@tsed/logger": "^6.7.8",
|
|
35
|
-
"@tsed/schema": "8.0.0-beta.
|
|
36
|
-
"@tsed/typescript": "8.0.0-beta.
|
|
35
|
+
"@tsed/schema": "8.0.0-beta.5",
|
|
36
|
+
"@tsed/typescript": "8.0.0-beta.5",
|
|
37
37
|
"cross-env": "7.0.3",
|
|
38
38
|
"eslint": "9.12.0",
|
|
39
39
|
"typescript": "5.4.5",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"webpack": "^5.75.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@tsed/core": "8.0.0-beta.
|
|
44
|
+
"@tsed/core": "8.0.0-beta.5",
|
|
45
45
|
"@tsed/logger": ">=6.7.5",
|
|
46
|
-
"@tsed/schema": "8.0.0-beta.
|
|
46
|
+
"@tsed/schema": "8.0.0-beta.5"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
|
49
49
|
"@tsed/core": {
|
package/readme.md
CHANGED
|
@@ -91,7 +91,8 @@ The `@Injectable()` attaches the metadata, thereby Ts.ED knows that this class i
|
|
|
91
91
|
Now we have the service class already done, let's use it inside a controller:
|
|
92
92
|
|
|
93
93
|
```typescript
|
|
94
|
-
import {Controller
|
|
94
|
+
import {Controller} from "@tsed/di";
|
|
95
|
+
import {Post, Body, Get} from "@tsed/schema";
|
|
95
96
|
import {CalendarsService} from "./CalendarsService.js";
|
|
96
97
|
import {Calendar} from "./models/Calendar.js";
|
|
97
98
|
|
|
@@ -111,9 +112,6 @@ export class CalendarCtrl {
|
|
|
111
112
|
}
|
|
112
113
|
```
|
|
113
114
|
|
|
114
|
-
> Note: Controller isn't a part of `@tsed/di`. `@Controller` decorator is exposed by `@tsed/common` package because it's a specific provider
|
|
115
|
-
> used by the Ts.ED framework. Ts.ED DI allow you to define your own Provider and decorator.
|
|
116
|
-
|
|
117
115
|
Finally, we can load the injector and use:
|
|
118
116
|
|
|
119
117
|
```typescript
|