咸鱼要翻身
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
879 B

3 months ago
import { getFromContainer } from "../container";
/**
* This metadata interface contains information for custom validators.
*/
export class ConstraintMetadata {
// -------------------------------------------------------------------------
// Constructor
// -------------------------------------------------------------------------
constructor(target, name, async = false) {
this.target = target;
this.name = name;
this.async = async;
}
// -------------------------------------------------------------------------
// Accessors
// -------------------------------------------------------------------------
/**
* Instance of the target custom validation class which performs validation.
*/
get instance() {
return getFromContainer(this.target);
}
}
//# sourceMappingURL=ConstraintMetadata.js.map