* **errors:** rename "CannotBeSymbol" to "CannotBeSymbolError" to match style ([454c23b](https://github.com/typegoose/typegoose/commit/454c23b0d4de4dc95dea48316339c33697ca0c5b))
* **processProp:** merge Error "E008" into "E026" ([3469a22](https://github.com/typegoose/typegoose/commit/3469a22e847d1ad4833b8bf263c759018e9a1224))
* **typegoose:** add option to use "Passthrough" directly (no "type" property inbetween) ([7379810](https://github.com/typegoose/typegoose/commit/73798104c8865e80ababba1663946fda6fefdb11))
* **typegoose:** add option to use "Passthrough" directly (no "type" property inbetween) ([7379810](https://github.com/typegoose/typegoose/commit/73798104c8865e80ababba1663946fda6fefdb11))
* **utils::mergeMetadata:** change custom error to use "StringLengthExpectedError" ([9ad3013](https://github.com/typegoose/typegoose/commit/9ad30133a5967fe2b889c00ad1e97314a03f6401))
* change build order to bottom-up (when extending classes) ([#243](https://github.com/typegoose/typegoose/issues/243)) ([79977ee](https://github.com/typegoose/typegoose/commit/79977ee675a48fda280be5a10bc9b962721cd5dc))
* merge errors "E023" into "E013" ([c8ce9b8](https://github.com/typegoose/typegoose/commit/c8ce9b8c36d82f9d23e66d4cdda86cb86567b4fa))
* **typegoose:** add option to use "Passthrough" directly (no "type" property inbetween) ([7379810](https://github.com/typegoose/typegoose/commit/73798104c8865e80ababba1663946fda6fefdb11))
* **typegoose:** add option to use "Passthrough" directly (no "type" property inbetween) ([7379810](https://github.com/typegoose/typegoose/commit/73798104c8865e80ababba1663946fda6fefdb11))
* **semantic-release:** upgrade to version "17.4.2" ([283afb1](https://github.com/typegoose/typegoose/commit/283afb15427650941236dce9583b4315152a6e36))
* **semantic-release:** upgrade to version "17.4.3" ([ed4cbfc](https://github.com/typegoose/typegoose/commit/ed4cbfce8a67e18692d2de1436ecaac72bbae773))
* **semantic-release:** upgrade to version "17.4.4" ([090d05f](https://github.com/typegoose/typegoose/commit/090d05f964f680767fc8321a1525e6fdf2a60078))
* **ts-jest:** upgrad eto version 27.0.4 ([e20fd0c](https://github.com/typegoose/typegoose/commit/e20fd0c7f0f01442591b8f604c8fab5a8be7fc43))
* **ts-jest:** upgrade eto version 27.0.4 ([e20fd0c](https://github.com/typegoose/typegoose/commit/e20fd0c7f0f01442591b8f604c8fab5a8be7fc43))
* **ts-jest:** upgrade to version "26.5.4" ([047051b](https://github.com/typegoose/typegoose/commit/047051bc0bb6c280c82914ae4a13e7e733faa02d))
* **ts-jest:** upgrade to version "27.0.3" ([dc0452f](https://github.com/typegoose/typegoose/commit/dc0452ffa5f5a58de24e4bd154119571d9d7fb96))
* **tslib:** upgrade to version "2.2.0" ([edd2581](https://github.com/typegoose/typegoose/commit/edd2581db6e572bbd7286a307ed3fcf7761ca140))
* **lint-staged:** upgrade to version 11.1.1 ([5f370ad](https://github.com/typegoose/typegoose/commit/5f370ad81faff038c1dad5997d018def79fc880c))
* **mongodb-memory-server:** upgrade to version 7.3.4 ([460bdcb](https://github.com/typegoose/typegoose/commit/460bdcbc0a050c678c5eac42d8333558d07c72f5))
* **mongoose:** upgrade to version 5.13.3 ([c7414e6](https://github.com/typegoose/typegoose/commit/c7414e649369c0198b80fffc5004d6c014600cde))
* **ts-jest:** upgrad eto version 27.0.4 ([e20fd0c](https://github.com/typegoose/typegoose/commit/e20fd0c7f0f01442591b8f604c8fab5a8be7fc43))
* **ts-jest:** upgrade eto version 27.0.4 ([e20fd0c](https://github.com/typegoose/typegoose/commit/e20fd0c7f0f01442591b8f604c8fab5a8be7fc43))
### Style
@ -1645,7 +1645,7 @@ Everything Below here is manually made:
- Change "Options-not-for-current-type" Errors into warnings (with actual information on what options are included) [[typegoose#363](https://github.com/typegoose/typegoose/issues/363)]
- [IC] Assing `schemaOptions` in `src/internal/schema.ts` to an black object [[typegoose#357](https://github.com/typegoose/typegoose/issues/357)]
- [IC] Assigning `schemaOptions` in `src/internal/schema.ts` to an black object [[typegoose#357](https://github.com/typegoose/typegoose/issues/357)]
## 7.3.4
@ -1653,7 +1653,7 @@ Everything Below here is manually made:
## 7.3.3
- Dont assume that the plugin function has an name [[typegoose#353](https://github.com/typegoose/typegoose/issues/353)]
- Don't assume that the plugin function has an name [[typegoose#353](https://github.com/typegoose/typegoose/issues/353)]
- Only check mongoose & nodejs version if `process` is defined
- [IC] replace all `util.format` with template strings [[typegoose#348](https://github.com/typegoose/typegoose/issues/348)]
- [IC] add wrapper & polyfill for `util.deprecate`[[typegoose#344](https://github.com/typegoose/typegoose/issues/344)]
@ -1684,12 +1684,12 @@ Everything Below here is manually made:
- Add option `discriminators` for embedded Discriminators [[typegoose#248](https://github.com/typegoose/typegoose/issues/248)]
- Set correct Decorator Return type (`ClassDecorator` &`PropertyDecorator`)
- Change warning message for `warnMixed`
- If an SchemaType dosnt extend `SchemaTypeOptions`, the options are now defaulted to the outer-layer
- If an SchemaType doesn't extend `SchemaTypeOptions`, the options are now defaulted to the outer-layer
- `innerOptions` and `outerOptions` can now be used for Maps too
- Custom Validators now support `message` being an function
- Automatically convert `mongoose.Types.Buffer` to `mongoose.Schema.Types.Buffer`
- Fix Types when extending default class `Base` with other than `ObjectId` [[typegoose#316](https://github.com/typegoose/typegoose/issues/316)]
- [IC] `mapOptions` now always errors if the given type dosnt extend `mongoose.SchemaTypeOptions`
- [IC] `mapOptions` now always errors if the given type doesn't extend `mongoose.SchemaTypeOptions`
- [IC] Moved function `_buildPropMetadata` to its own file (`processProp`) and renamed it to `processProp` [[typegoose#286](https://github.com/typegoose/typegoose/issues/286)]
- [IC] Moved pre-processing in function `prop` into `processProp` [[typegoose#286](https://github.com/typegoose/typegoose/issues/286)]
- [IC] Removed error `NoMetadataError`
@ -1716,9 +1716,9 @@ Everything Below here is manually made:
## 7.1.2
- `@prop` options types now work again
- `BasePropOptions.type` is now `unkown` instead of `any`
- `BasePropOptions.type` is now `unknown` instead of `any`
- All aliases of `BasePropOptions.type` now inherit the types from there
- Fix bug where autopopulate (or any other plugin) wouldnt pick up on virtuals [[typegoose#274](https://github.com/typegoose/typegoose/issues/274)]
- Fix bug where autopopulate (or any other plugin) wouldn't pick up on virtuals [[typegoose#274](https://github.com/typegoose/typegoose/issues/274)]
- [IC] `refType` is now moved to `prop`
## 7.1.1
@ -1759,7 +1759,7 @@ Everything Below here is manually made:
- The functions `addModelToTypegoose`, `getModelForClass`, `getDiscriminatorModelForClass` now have an new optional generic `QueryHelpers`
- The Type `ReturnModelType` now has the `T` generic removed (it was unnecessary)
- The Type `ReturnModelType` now has an second optional generic `QueryHelpers`
- Fix bug where `ref: Class` didnt execute `getName` when Virtual-Populate was used
- Fix bug where `ref: Class` didn't execute `getName` when Virtual-Populate was used
- Allow use of `@prop` for arrays & maps (In preparation for 8.0), it is now auto-detected based on `design:type`
- The Decorator `@plugin` now automatically infers the options if the plugin & function have typings and use options
- [IC] add some tslint rules & apply them
@ -1774,7 +1774,7 @@ Everything Below here is manually made:
- `@types/mongoose` to 5.7.12
- Minimal NodeJS version is now 10.15
- Minimal Typescript version is now 3.8.3
- Typegoose class got completly removed
- Typegoose class got completely removed
- All Deprecated `arrayProp` options got remove
- `itemsRef` replaced with plain `ref`
- `itemsRefPath` replaced with plain `refPath`
@ -1782,7 +1782,7 @@ Everything Below here is manually made:
- All enums got moved from `src/types` to `src/internal/constants`
- All things from `src/types` now get exported as `type`
- All Errors now get exported as `errors`
- All non-essentail types get exported as `types`
- All non-essential types get exported as `types`
- `utils`'s `getName` function now gets exported
- Add PropOption `addNullToEnum`
- Remove Deprecated value `overwrite` for `VirtualOptions`
@ -1790,7 +1790,7 @@ Everything Below here is manually made:
- Add class decorator `queryMethod`
- [IC] rename file `optionsProp` to `modelOptions`
- [IC] Replace mocha & chai with jest
- [IC] Completly remove `TG_USE_NEW_ENUM` from documentation & code
- [IC] Completely remove `TG_USE_NEW_ENUM` from documentation & code
- [IC] Replace almost all if-throw with the internal `assertion` function
- [IC] Move VirtualPopulate cache to Reflection
- [IC] Move Plugins cache to Reflection
@ -1817,7 +1817,7 @@ Everything Below here is manually made:
- `semver` to 7.1.3
- `loglevel` to 1.6.7
- `tslib` to 1.11.0
- Completly remove `__uniqueID`, because it was not used internally anymore
- Completely remove `__uniqueID`, because it was not used internally anymore
## 6.3.2
@ -1835,7 +1835,7 @@ Everything Below here is manually made:
- `semver` to 7.1.2
- Add `@types/mongoose` to `peerDependencies`
- Add generic type to `@plugin` to set the type for the options
- Use a modified `Ref`-Type to automatically get the type (if the Ref'd type has `string` as `_id`, it automaticly sets the `RefType` to `string`)
- Use a modified `Ref`-Type to automatically get the type (if the Ref'd type has `string` as `_id`, it automatically sets the `RefType` to `string`)
## 6.2.2
@ -1854,7 +1854,7 @@ This Update may break some code (mongoose upgrade, inline `_id` change, `enum` c
- Upgrade @types/mongoose from 5.5.30 to 5.5.35
- [IC] Upgrade Typescript from 3.7.2 to 3.7.4
- [IC] Upgrade NYC from 14.1.1 to 15.0.0
- The option `useNewEnum` (and `TG_USE_NEW_ENUM`) got removed, because it would interfer with the number-enums
- The option `useNewEnum` (and `TG_USE_NEW_ENUM`) got removed, because it would interfere with the number-enums
- Added the ability to use number-enums on number-type props
- Changed behaviour of string-enums to only work on string-type props
- Fix `PropOptions` type for `autopopulate`
@ -1894,7 +1894,7 @@ This Update may break some code (mongoose upgrade, inline `_id` change, `enum` c
## 6.1.3
- fix bug when "buildSchema" didnt get called when overwriting the type in `@prop`
- fix bug when "buildSchema" didn't get called when overwriting the type in `@prop`
- [IC] add tests for Generic Discriminators
## 6.1.2
@ -1912,7 +1912,7 @@ This Update may break some code (mongoose upgrade, inline `_id` change, `enum` c
- Update Dependencies
- Upgrade mongoose from 5.7.1 to 5.7.7
- [IC] Upgrade Typescript from 3.6.x to 3.7.2
- Completly remove `@staticMethod`&`@instanceMethod`, because they were completly obsolete
- Completely remove `@staticMethod`&`@instanceMethod`, because they were completely obsolete
- README now has no documentation anymore
- `@prop({ validate })` now accepts `{ validator, message }` as an array
- Add function `deleteModel`&`deleteModelWithClass`
@ -1942,12 +1942,12 @@ This Update may break some code (mongoose upgrade, inline `_id` change, `enum` c
- [IC] Refactor how "isPrimitive" works, some types like `Buffer`&`Decimal` now work
- [IC] Added more debug logs to `prop.ts`
- [IC] Move Decorator Cache to the class itself
- [IC] "baseProp" now uses one single arguments, whith all the options
- [IC] "baseProp" now uses one single arguments, with all the options
- [IC] "createUniqueID" now returns a boolean instead of the "initname"
## 6.0.4
This Release didnt change anything on the code, it was mostly tests & github-page
This Release didn't change anything on the code, it was mostly tests & github-page
- Update Dependencies
- Upgrade mongoose from 5.7.1 to 5.7.4
- Added soft warning when using "ref" in an "arrayProp"
@ -2006,7 +2006,7 @@ This Release didnt change anything on the code, it was mostly tests & github-pag
- adding Types to Ref (to allow not just ObjectID) [[szokodiakos#369](https://github.com/szokodiakos/typegoose/issues/369)]
- szokodiakos#54 seems to work now in 6.0.0 (added test in 6.0.0-21)
- because of the changes in 6.0.0 #235 got fixed
- Adding "InvalidTypeError" for the case that "undefined" or "null" is used as a type (or something other happenes)
- Adding "InvalidTypeError" for the case that "undefined" or "null" is used as a type (or something other happens)
- Change Error text of "InvalidPropError"
- adding some "soft-errors" and traces with "loglevel"
- exposing settings for "loglevel"
@ -2046,7 +2046,7 @@ This Release did not change anything in the code, it is just there to update the
- This should not be a breaking release
- Hooks now support Regular Expression for names, like mongoose
- Tests are splitted into their own files
- Tests are split into their own files
- Fixing `itemsRefPath`& adding tests
- `itemsRef` now supports to be used with a string as model
`@index` is used to set indices on the schema, this decorator acts like `schema.index()`.
:::note
For [Full-Text Search](https://docs.mongodb.com/manual/tutorial/control-results-of-text-search/) option `weights` all fields (from `fields`) have to also be defined in `weigths`.
For [Full-Text Search](https://docs.mongodb.com/manual/tutorial/control-results-of-text-search/) option `weights` all fields (from `fields`) have to also be defined in `weights`.
Set it to `false`, if you want to retrieve data without this property by default
-> [Read more in Mongoose's offical documentation](https://mongoosejs.com/docs/api.html#schematype_SchemaType-select)
-> [Read more in Mongoose's official documentation](https://mongoosejs.com/docs/api.html#schematype_SchemaType-select)
```ts
class Dummy {
@ -677,7 +677,7 @@ class Something {
}
```
This option `dim` can be ommitted, when used with the `() => [Type]` syntax (since `7.4.0`):
This option `dim` can be omitted, when used with the `() => [Type]` syntax (since `7.4.0`):
```ts
class ArrayInType {
@ -757,7 +757,7 @@ class LowerCased {
Accepts Type: `boolean`
Set this to `true`, if the value should always be transformed to be UPPERCASE. <!--please dont change this to lowercase-->
Set this to `true`, if the value should always be transformed to be UPPERCASE. <!--please don't change this to lowercase-->
Example:
@ -891,14 +891,14 @@ Set the field to look at in the local document and be compared with the field se
Accepts Type: `boolean`
Conflicts with: [`count`](#count)
Set wheter the query should only return one document instead of a array of documents.
Set whether the query should only return one document instead of a array of documents.
### count
Accepts Type: `boolean`
Conflicts with: [`justOne`](#justone)
Set wheter the query should return a count of found documents instead of the documents themself.
Set whether the query should return a count of found documents instead of the documents themself.
### options {#virtual-populate-options-option}
@ -952,7 +952,7 @@ Also see the [FAQ `Do all Classes get compiled to their own "mongoose.Schema"?`]
It should be noted that using this method no typegoose transformations or warnings will be applied to what is inside `Passthrough.raw` (like `type: () => Class` will not be translated, it will stay as-is).
:::
There is also a option to set the `Passthrough` class to `direct` mode (with the second parameter), this will mean that absolutlely no typegoose process is applied (everything has to be done manually), see [Passthrough-Class#Direct](#passthrough-direct).
There is also a option to set the `Passthrough` class to `direct` mode (with the second parameter), this will mean that absolutely no typegoose process is applied (everything has to be done manually), see [Passthrough-Class#Direct](#passthrough-direct).
@ -25,7 +25,7 @@ Error: `You are using a NodeJS Version below 12.22.0, Please Upgrade! [E002]`
Error Class: `Error`
Details:
Typegoose requires at least NodeJS Version 12.22, because NodeJS 12 is the lowest activly maintained version AND is the lowest that supports all functions needed by typegoose (without having to add polyfills)
Typegoose requires at least NodeJS Version 12.22, because NodeJS 12 is the lowest actively maintained version AND is the lowest that supports all functions needed by typegoose (without having to add polyfills)
### Function only supports to be called "${supported}" times [E003]
For example [`addModelToTypegoose`](../api/functions/addModelToTypegoose.md) only supports to be called once (1) with the same model name, [this problem has a specific Guide](./advanced/models-with-same-name.md).
### Self Containg Class [E004]
### Self Containing Class [E004]
Error:
@ -67,7 +67,7 @@ Either:
- The Option `ref` was defined with a function, but that function returned `undefined / null`
- The Option `ref` was defined with `undefined / null` (`{ ref: undefined }`) ([Can Be Solved with this guide](./advanced/reference-other-classes.md#common-problems))
Example of when this gets triggerd:
Example of when this gets triggered:
```ts
class ErrorClass {
@ -192,7 +192,7 @@ This may be thrown when using typescript option `transpileOnly` (see [Known Issu
This Error has a workaround, see [Use Without "emitDecoratorMetadata"](./use-without-emitDecoratorMetadata.md).
:::
<!--The Following "a" is a backwards-comaptability anchor-->
<!--The Following "a" is a backwards-compatability anchor-->
<aname="invalid-whatisit-used-e013"></a>
### Invalid PropType used [E013]
@ -209,14 +209,14 @@ The Value `${proptype}` is not supported in `${where}` or does not exist in the
Error:
```txt
Input was not a string AND didnt have a .typegooseName function AND didnt have a .typegooseName string [E014]
Input was not a string AND didn't have a .typegooseName function AND didn't have a .typegooseName string [E014]
Value: "${toStringNoFail(input)}"
```
Error Class: `ResolveTypegooseNameError`
Details:
The Provided Input `input` was not a string and didnt have a `.typegooseName` function / string to be searched by.
The Provided Input `input` was not a string and didn't have a `.typegooseName` function / string to be searched by.
### customName must be string and at least one character [E015]
The Type provided `type` does not have a `OptionsConstructor` property, this property is required to map options correctly.
Typegoose uses the property [`OptionsConstructor`](https://github.com/Automattic/mongoose/tree/master/lib/options) on types (like `mongoose.Schema.Types.ObjectId.OptionsConstructor`) to correctly map the options (from `@prop(options)`) to the appropiate place.
Typegoose uses the property [`OptionsConstructor`](https://github.com/Automattic/mongoose/tree/master/lib/options) on types (like `mongoose.Schema.Types.ObjectId.OptionsConstructor`) to correctly map the options (from `@prop(options)`) to the appropriate place.
If custom types are used and they dont have `OptionsConstructor`, and an easy way to workaround this error is the following:
If custom types are used and they don't have `OptionsConstructor`, and an easy way to workaround this error is the following:
```ts
mongoose.Schema.Types.Custom.OptionsConstructor = {}; // only do this if really necessary
@ -11,7 +11,7 @@ A: The original author szokodiakos (github name) [has abandoned the project](htt
### Is this Project still active?
A: Yes it is, but not on the main repository anymore because of [What happened to the original author?](#what-happened-to-the-original-author) and [Github Permissions](https://help.github.com/en/articles/permission-levels-for-a-user-account-repository) (TL;DR: a collaborator cannot add another collaborater, only the owner can)
A: Yes it is, but not on the main repository anymore because of [What happened to the original author?](#what-happened-to-the-original-author) and [Github Permissions](https://help.github.com/en/articles/permission-levels-for-a-user-account-repository) (TL;DR: a collaborator cannot add another collaborator, only the owner can)
### Why is the package now released in another package?
@ -20,7 +20,7 @@ A: Because of a Repository Switch ([reasons](#is-this-project-still-active)) and
### Why `@typegoose/typegoose`
A: Because I (hasezoey) don't have permissions over the old `typegoose` repository and I dont want to touch the old npm package. It is a typical forking and continuation of an OSS project.
A: Because I (hasezoey) don't have permissions over the old `typegoose` repository and I don't want to touch the old npm package. It is a typical forking and continuation of an OSS project.
It is better to have [DTOs](https://en.wikipedia.org/wiki/Data_transfer_object) to separate your API logic (decorated with @deepkit/type decorators) from your Entities (decorated with Typgoose decorators). This may seem like extra code, verbosity and work, but it is smart, because it will allow you to change your API and Entities separate from each other.
It is better to have [DTOs](https://en.wikipedia.org/wiki/Data_transfer_object) to separate your API logic (decorated with @deepkit/type decorators) from your Entities (decorated with Typegoose decorators). This may seem like extra code, verbosity and work, but it is smart, because it will allow you to change your API and Entities separate from each other.
:::
Suppose you have this `Account` class decorated with `@deepkit/type`:
@ -91,7 +91,7 @@ You can then do, for example:
As you can see from these code examples, there is:
* an `access` or `grouping` (`@t.group(group)`) definition needed to ouput the required properties for any serializing or deserializing. The `@deepkit/type` author suggests not using groupings at all, as they cause `@deepkit/type`'s performance to deteriorate. [See Offical Documentation for Reference](https://deepkit.io/documentation/type/serialization#groups), official quote:
* an `access` or `grouping` (`@t.group(group)`) definition needed to output the required properties for any serializing or deserializing. The `@deepkit/type` author suggests not using groupings at all, as they cause `@deepkit/type`'s performance to deteriorate. [See Official Documentation for Reference](https://deepkit.io/documentation/type/serialization#groups), official quote:
> Note: Using grouped serialization is much slower than regular serialization. If performance is important, consider rearranging your data into multiple classes instead.
* a `Mongodb.ObjectId` decorator (`@t.mongoId`) is built into `@deepkit/type`'s decorators to handle the type conversion to string and back to a MongoId.
@ -131,7 +131,7 @@ import * as mongoose from 'mongoose';
// Shorten type
const ObjectId = mongoose.Types.ObjectId;
// Create a Custom Serializer to add custom transfrom functions to types
// Create a Custom Serializer to add custom transform functions to types
const mySerializer = new (class CustomSerializer extends jsonSerializer.fork('mySerializer') {})();
// Note: A custom Serializer has to be used, because the included "mongoId" "decorator" only works with "@deepkit/orm"
<spanclass="badge badge--warning">This Section may be outdated</span>
Using babel as a TypeScript compiler is known to cause problems (like incorrect types) (see [`transpile-only`](#transpile-only)), it is recommened you use `tsc`, `ts-node` or `ts-jest` directly.
Using babel as a TypeScript compiler is known to cause problems (like incorrect types) (see [`transpile-only`](#transpile-only)), it is recommended you use `tsc`, `ts-node` or `ts-jest` directly.
If Babel is still needed, then read [Babel TypeScript preset](https://babeljs.io/docs/en/babel-preset-typescript) and install the following plugins:
@ -35,7 +35,7 @@ All possible cache-maps that were in `data.ts` were refactored to be in the refl
## [IC] almost all "if-throw" blocks got replaced with "assertion" functions
Typescript 3.7 introduced a new type-keyword [`asserts`](https://devblogs.microsoft.com/typescript/announcing-typescript-3-7/#assertion-functions) and now almost every occurence has been replaced with a custom assertion function.
Typescript 3.7 introduced a new type-keyword [`asserts`](https://devblogs.microsoft.com/typescript/announcing-typescript-3-7/#assertion-functions) and now almost every occurrence has been replaced with a custom assertion function.
## [IC] The Testing Framework for Typegoose changed to Jest
Typegoose can be used without the option [`emitDecoratorMetadata`](https://www.typescriptlang.org/tsconfig#emitDecoratorMetadata), but it is generally recommeneded to enable it for auto-inferring from the typescript type.
Typegoose can be used without the option [`emitDecoratorMetadata`](https://www.typescriptlang.org/tsconfig#emitDecoratorMetadata), but it is generally recommended to enable it for auto-inferring from the typescript type.
## Advantages to "emitDecoratorMetadata"
When using `emitDecoratorMetadata`, it is not needed to be explicit about *everything*, like the following example would simply "compile" into the appropiate types.
When using `emitDecoratorMetadata`, it is not needed to be explicit about *everything*, like the following example would simply "compile" into the appropriate types.
:::info
Some Properties (like Arrays & Maps) need to be always explicit, see [`@prop` Array Options](../api/decorators/prop.md#array-options).
@ -5,7 +5,7 @@ exports[`should error if 0 or less dimensions are given (createArrayFromDimensio
exports[`should error if 0 or less dimensions are given (createArrayFromDimensions) [RangeError] [E018] 2`] = `"\\"dim\\" needs to be higher than 0 (.) [E018]"`;
exports[`should error if a non-valid object is passed to "getClass" [ResolveTypegooseNameError] [E014] 1`] = `
"Input was not a string AND didnt have a .typegooseName function AND didnt have a .typegooseName string [E014]
"Input was not a string AND didn't have a .typegooseName function AND didn't have a .typegooseName string [E014]