Utility type to extract Creation Attributes of a given Model class.
Works like InferAttributes, but fields that are tagged using CreationOptional will be optional.
class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> { // this attribute is optional in Model#create declare id: CreationOptional<number>; // this attribute is mandatory in Model#create declare name: string;}
Generated using TypeDoc
Utility type to extract Creation Attributes of a given Model class.
Works like InferAttributes, but fields that are tagged using CreationOptional will be optional.
Example