@aomex/core
Advanced tools
Comparing version 0.0.27 to 0.0.28
# @aomex/core | ||
## 0.0.28 | ||
### Patch Changes | ||
- [`90ca7d5`](https://github.com/aomex/aomex/commit/90ca7d5fc736b523c4fbf7949f64653428dc413c) Thanks [@geekact](https://github.com/geekact)! - feat(core)!: 删除函数createDTO | ||
## 0.0.27 | ||
@@ -4,0 +10,0 @@ |
@@ -792,22 +792,2 @@ import { NonReadonly } from '@aomex/internal-tools'; | ||
declare class DataTransferObject<T> { | ||
readonly validator: Validator<T>; | ||
constructor(validator: Validator<T>); | ||
readonly interface: T; | ||
} | ||
/** | ||
* 创建数据传送对象(Data Transfer Object),可用于验证和类型提示 | ||
* | ||
* - dto.validator | ||
* - typeof dto.interface | ||
* | ||
* ```typescript | ||
* // user.dto.ts | ||
* export const getUserDTO = createDTO({ | ||
* userId: rule.int().min(1), | ||
* }); | ||
* ``` | ||
*/ | ||
declare const createDTO: <T extends CompatibleValidator>(rules: T) => DataTransferObject<Validator.Infer<T>>; | ||
interface Caching { | ||
@@ -881,2 +861,2 @@ /** | ||
export { AnyValidator, ArrayValidator, BaseNumberValidator, BaseStringValidator, BigIntValidator, BooleanValidator, BufferValidator, Caching, Chain, ChainPlatform, CompatibleValidator, Compose, DataTransferObject, DateTimeValidator, EmailValidator, EnumValidator, HashValidator, IntValidator, IpValidator, LengthRange, MiddleWareToken, Middleware, MiddlewarePlatform, MixinLength, Next, NumberValidator, ObjectValidator, OneOfValidator, PureChain, PureMiddleware, PureMiddlewareToken, Rule, StringValidator, TransformedValidator, UlidValidator, UrlValidator, UuidValidator, ValidateOptions, Validator, ValidatorError, _PureFn, chain, compose, createDTO, forceToValidator, magistrate, middleware, mixinLength, rule, validate }; | ||
export { AnyValidator, ArrayValidator, BaseNumberValidator, BaseStringValidator, BigIntValidator, BooleanValidator, BufferValidator, Caching, Chain, ChainPlatform, CompatibleValidator, Compose, DateTimeValidator, EmailValidator, EnumValidator, HashValidator, IntValidator, IpValidator, LengthRange, MiddleWareToken, Middleware, MiddlewarePlatform, MixinLength, Next, NumberValidator, ObjectValidator, OneOfValidator, PureChain, PureMiddleware, PureMiddlewareToken, Rule, StringValidator, TransformedValidator, UlidValidator, UrlValidator, UuidValidator, ValidateOptions, Validator, ValidatorError, _PureFn, chain, compose, forceToValidator, magistrate, middleware, mixinLength, rule, validate }; |
@@ -1336,13 +1336,2 @@ // src/middleware/chain.ts | ||
// src/validator/api/create-dto.ts | ||
var DataTransferObject = class { | ||
constructor(validator) { | ||
this.validator = validator; | ||
} | ||
interface; | ||
}; | ||
var createDTO = (rules) => { | ||
return new DataTransferObject(forceToValidator(rules)); | ||
}; | ||
// src/openapi-type/index.ts | ||
@@ -1359,3 +1348,2 @@ import { OpenAPIV3 } from "openapi-types"; | ||
Chain, | ||
DataTransferObject, | ||
DateTimeValidator, | ||
@@ -1383,3 +1371,2 @@ EmailValidator, | ||
compose, | ||
createDTO, | ||
forceToValidator, | ||
@@ -1386,0 +1373,0 @@ magistrate, |
{ | ||
"name": "@aomex/core", | ||
"version": "0.0.27", | ||
"version": "0.0.28", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172515
2171