ts-deco 1.0.4 → 1.0.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/README.md +2 -18
- package/package.json +2 -5
package/README.md
CHANGED
|
@@ -227,22 +227,6 @@ name: string;
|
|
|
227
227
|
- **배열 검증**: `isArray: true`인 경우 배열 타입만 허용
|
|
228
228
|
- **열거형 검증**: `enum`이 제공되면 해당 값만 허용
|
|
229
229
|
|
|
230
|
-
## 유틸리티 함수
|
|
231
|
-
|
|
232
|
-
### applyDecorators
|
|
233
|
-
|
|
234
|
-
여러 데코레이터를 하나로 합치는 유틸리티 함수입니다:
|
|
235
|
-
|
|
236
|
-
```typescript
|
|
237
|
-
import { applyDecorators } from 'ts-deco';
|
|
238
|
-
import { ApiProperty } from '@nestjs/swagger';
|
|
239
|
-
import { IsString } from 'class-validator';
|
|
240
|
-
|
|
241
|
-
const MyDecorator = applyDecorators(
|
|
242
|
-
ApiProperty(),
|
|
243
|
-
IsString()
|
|
244
|
-
);
|
|
245
|
-
```
|
|
246
230
|
|
|
247
231
|
⚠️ **주의**: 모든 데코레이터는 동일한 타입이어야 합니다.
|
|
248
232
|
|
|
@@ -252,7 +236,7 @@ const MyDecorator = applyDecorators(
|
|
|
252
236
|
|
|
253
237
|
## 의존성
|
|
254
238
|
|
|
255
|
-
이 라이브러리는 다음 패키지들을 **
|
|
239
|
+
이 라이브러리는 다음 패키지들을 **dependencies**로 포함하고 있어, `npm install ts-deco` 실행 시 자동으로 함께 설치됩니다:
|
|
256
240
|
|
|
257
241
|
| 패키지 | 버전 | 용도 |
|
|
258
242
|
|--------|------|------|
|
|
@@ -260,7 +244,7 @@ const MyDecorator = applyDecorators(
|
|
|
260
244
|
| `class-transformer` | ^0.5.0 | 타입 변환 데코레이터 |
|
|
261
245
|
| `class-validator` | ^0.14.0 | 검증 데코레이터 |
|
|
262
246
|
|
|
263
|
-
> **참고**:
|
|
247
|
+
> **참고**: 별도로 설치할 필요 없이 `npm install ts-deco`만 실행하면 모든 의존성이 자동으로 설치됩니다.
|
|
264
248
|
|
|
265
249
|
## 라이선스
|
|
266
250
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-deco",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "TypeScript decorator utilities for NestJS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,15 +26,12 @@
|
|
|
26
26
|
],
|
|
27
27
|
"author": "",
|
|
28
28
|
"license": "ISC",
|
|
29
|
-
"
|
|
29
|
+
"dependencies": {
|
|
30
30
|
"@nestjs/swagger": "^7.0.0",
|
|
31
31
|
"class-transformer": "^0.5.0",
|
|
32
32
|
"class-validator": "^0.14.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@nestjs/swagger": "^7.0.0",
|
|
36
|
-
"class-transformer": "^0.5.0",
|
|
37
|
-
"class-validator": "^0.14.0",
|
|
38
35
|
"typescript": "^5.0.0"
|
|
39
36
|
}
|
|
40
37
|
}
|