@@ -129,24 +129,24 @@ type DecoratorArgs<T extends JSORMBase> =
129129 | AssociationFactoryOpts < T >
130130 | string
131131 | typeof JSORMBase
132- /*
133- * Yup that's a super-Java-y method name. Decorators in
132+ /*
133+ * Yup that's a super-Java-y method name. Decorators in
134134 * ES7/TS are either of the form:
135- *
135+ *
136136 * @decorator foo : string
137- * or
137+ * or
138138 * @decorator (options) foo : string
139- *
140- * The first is a function that directly decorates the
139+ *
140+ * The first is a function that directly decorates the
141141 * property, while this second is a factory function
142142 * that returns a decorator function.
143- *
143+ *
144144 * This method builds the factory function for each of our
145- * association types.
146- *
145+ * association types.
146+ *
147147 * Additionally, users without decorator support can apply these
148148 * to their ES6-compatible classes directly if they prefer:
149- *
149+ *
150150 * ``` javascript
151151 * class Person extends ApplicationRecord {
152152 * fullName() { `${this.firstName} ${this.lastName} `}
@@ -155,7 +155,7 @@ type DecoratorArgs<T extends JSORMBase> =
155155 * Attr(Person, 'lastName')
156156 * BelongsTo(Person, 'mother', { type: Person })
157157 * ```
158- *
158+ *
159159 */
160160
161161const AssociationDecoratorFactoryBuilder = < T extends JSORMBase > (
@@ -220,7 +220,7 @@ const AssociationDecoratorFactoryBuilder = <T extends JSORMBase>(
220220 attrDefinition . owner = target . constructor
221221 attrDefinition . apply ( ModelClass )
222222
223- attrDefinition . descriptor ( )
223+ return attrDefinition . descriptor ( )
224224 }
225225
226226 if ( isModelClass ( targetOrConfig ) && propertyKey ) {
0 commit comments