Skip to content

Commit 41cc0b4

Browse files
committed
enhancement: reduce errors generated from JSDoc expectations
1 parent 19c810b commit 41cc0b4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/JSONAPISerializer.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = class JSONAPISerializer {
3636
*
3737
* @method JSONAPISerializer#register
3838
* @param {string} type resource's type.
39-
* @param {string} [schema=default] schema name.
39+
* @param {string|Object} [schema='default'] schema name.
4040
* @param {Object} [options] options.
4141
*/
4242
register(type, schema, options) {
@@ -60,7 +60,7 @@ module.exports = class JSONAPISerializer {
6060
* @method JSONAPISerializer#serialize
6161
* @param {string|Object} type resource's type as string or a dynamic type options as object.
6262
* @param {Object|Object[]} data input data.
63-
* @param {string} [schema=default] resource's schema name.
63+
* @param {string|Object} [schema='default'] resource's schema name.
6464
* @param {Object} [extraData] additional data that can be used in topLevelMeta options.
6565
* @return {Object} serialized data.
6666
*/
@@ -115,7 +115,7 @@ module.exports = class JSONAPISerializer {
115115
* @method JSONAPISerializer#serializeAsync
116116
* @param {string} type resource's type.
117117
* @param {Object|Object[]} data input data.
118-
* @param {string} [schema=default] resource's schema name.
118+
* @param {string} [schema='default'] resource's schema name.
119119
* @param {Object} [extraData] additional data that can be used in topLevelMeta options.
120120
* @return {Promise} resolves with serialized data.
121121
*/
@@ -333,7 +333,7 @@ module.exports = class JSONAPISerializer {
333333
* @param {string|Object} type resource's type as string or an object with a dynamic type resolved from data.
334334
* @param {Object} data JSON API resource data.
335335
* @param {string} [schema=default] resource's schema name.
336-
* @param {Map<string:Object>} included.
336+
* @param {Map<string, Object>} included Included resources.
337337
* @return {Object} deserialized data.
338338
*/
339339
deserializeResource(type, data, schema, included) {
@@ -465,8 +465,8 @@ module.exports = class JSONAPISerializer {
465465
* @private
466466
* @param {string} type resource's type.
467467
* @param {Object|Object[]} data input data.
468-
* @param {options} options resource's configuration options.
469-
* @param {Map<string:Object>} included.
468+
* @param {Object} options resource's configuration options.
469+
* @param {Map<string, Object>} included Included resources.
470470
* @param {Object} extraData additional data.
471471
* @return {Object|Object[]} serialized data.
472472
*/
@@ -498,7 +498,7 @@ module.exports = class JSONAPISerializer {
498498
* @private
499499
* @param {Object} typeOption a dynamic type options.
500500
* @param {Object|Object[]} data input data.
501-
* @param {Map<string:Object>} included.
501+
* @param {Map<string, Object>} included Included resources.
502502
* @param {Object} extraData additional data.
503503
* @return {Object|Object[]} serialized data.
504504
*/
@@ -574,7 +574,7 @@ module.exports = class JSONAPISerializer {
574574
* @private
575575
* @param {Object|Object[]} data input data.
576576
* @param {Object} options resource's configuration options.
577-
* @param {Map<string:Object>} included.
577+
* @param {Map<string, Object>} included Included resources.
578578
* @param {Object} extraData additional data.
579579
* @return {Object} serialized relationships.
580580
*/
@@ -634,8 +634,8 @@ module.exports = class JSONAPISerializer {
634634
* @param {string|Function} rType the relationship's type.
635635
* @param {string} rSchema the relationship's schema
636636
* @param {Object|Object[]} rData relationship's data.
637-
* @param {Map<string:Object>} included.
638-
* @param {Object} the entire resource's data.
637+
* @param {Map<string, Object>} included Included resources.
638+
* @param {Object} data the entire resource's data.
639639
* @param {Object} extraData additional data.
640640
* @return {Object|Object[]} serialized relationship data.
641641
*/
@@ -700,7 +700,7 @@ module.exports = class JSONAPISerializer {
700700
* @param {Object} data data passed to functions options
701701
* @param {Object} extraData additional data passed to functions options
702702
* @param {Object} options configuration options.
703-
* @param {string} fallbackModeIfOneArg fallback mode if only one argument is passed to function.
703+
* @param {string} [fallbackModeIfOneArg] fallback mode if only one argument is passed to function.
704704
* Avoid breaking changes with issue https://github.com/danivek/json-api-serializer/issues/27.
705705
* @return {Object}
706706
*/

0 commit comments

Comments
 (0)