@typegoose/typegoose
Advanced tools
Changelog
7.1.2
@prop
options types now work againBasePropOptions.type
is now unknown
instead of any
BasePropOptions.type
now inherit the types from thererefType
is now moved to prop
Changelog
7.1.1
PropOptions
PropOptionsWithValidate
PropOptionsWithNumberValidate
to PropOptionsForNumber
PropOptionsWithStringValidate
to PropOptionsForString
options
& match
for VirtualOptions
enum
for ValidateNumberOptions
arrayProp
& mapProp
are now just an alias for prop
@deprecated
for arrayProp
and mapProp
mongoose.Types.Array
& mongoose.Schema.Types.Array
as Array
in @prop
mongoose.Types.Map
& mongoose.Schema.Types.Map
as Map
in @prop
@prop
Base
's __v
& __t
are now optional (with ?
)mongoose.Schema.Types.String
& mongoose.Schema.Types.Number
as valid enum typesof
& items
are now mapped to type
and get called when buildSchema
is calledprop.ts
Changelog
7.1.0
mongoose
to 5.9.14@types/mongoose
to 5.7.19tslib
to 2.0.0typescript
to 3.9.2queryMethod
reflectionqueryMethod
ref
with an arrow-function (ref: () => type
)@queryMethod
decorator@queryMethod
decorator now has correct types [typegoose#247]addModelToTypegoose
, getModelForClass
, buildSchema
, deleteModelWithClass
, getDiscriminatorModelForClass
now have the T
generic removed (it was unnecessary)addModelToTypegoose
, getModelForClass
, getDiscriminatorModelForClass
now have an new optional generic QueryHelpers
ReturnModelType
now has the T
generic removed (it was unnecessary)ReturnModelType
now has an second optional generic QueryHelpers
ref: Class
didn't execute getName
when Virtual-Populate was used@prop
for arrays & maps (In preparation for 8.0), it is now auto-detected based on design:type
@plugin
now automatically infers the options if the plugin & function have typings and use optionsChangelog
7.0.0
To Migrate, please look at the migration guide
mongoose
to 5.9.10@types/mongoose
to 5.7.12arrayProp
options got remove
itemsRef
replaced with plain ref
itemsRefPath
replaced with plain refPath
itemsRefType
replaced with plain refType
src/types
to src/internal/constants
src/types
now get exported as type
errors
types
utils
's getName
function now gets exportedaddNullToEnum
overwrite
for VirtualOptions
& T
from ModelType
)queryMethod
optionsProp
to modelOptions
TG_USE_NEW_ENUM
from documentation & codeassertion
functionmodel
anymore)Changelog
6.5.0
semver
to 7.3.2tslib
to 1.11.1loglevel
to 1.6.8useNewEnum
type from types
Mixed
(fixes typegoose#152)language_override
to IndexOptions