Skip to content

Commit

Permalink
Merge branch 'release/v2.3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
jirenius committed Mar 7, 2022
2 parents 55bc30b + 10e7d31 commit 7012735
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
40 changes: 20 additions & 20 deletions docs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,10 @@ ResCollection represents a collection provided over the RES API.
* [.auth(method, params)](#ResCollection+auth) ⇒ <code>Promise.&lt;object&gt;</code>
* [.toArray()](#ResCollection+toArray) ⇒ <code>Array.&lt;\*&gt;</code>
* _inner_
* [~addCallback](#ResCollection..addCallback) : <code>function</code>
* [~addEvent](#ResCollection..addEvent) : <code>object</code>
* [~removeCallback](#ResCollection..removeCallback) : <code>function</code>
* [~addCallback](#ResCollection..addCallback) : <code>function</code>
* [~removeEvent](#ResCollection..removeEvent) : <code>object</code>
* [~removeCallback](#ResCollection..removeCallback) : <code>function</code>

<a name="new_ResCollection_new"></a>

Expand Down Expand Up @@ -506,20 +506,6 @@ Returns a shallow clone of the internal array.

**Kind**: instance method of [<code>ResCollection</code>](#ResCollection)
**Returns**: <code>Array.&lt;\*&gt;</code> - Clone of internal array
<a name="ResCollection..addCallback"></a>

### ResCollection~addCallback : <code>function</code>
Add event emitted on any item being added to the collection.

**Kind**: inner typedef of [<code>ResCollection</code>](#ResCollection)

| Param | Type | Description |
| --- | --- | --- |
| event | [<code>addEvent</code>](#ResCollection..addEvent) | Add event data. |
| collection | [<code>ResCollection</code>](#ResCollection) | Collection emitting event. |
| event | <code>string</code> | Event name including namespace. |
| action | <code>string</code> | Event action. |

<a name="ResCollection..addEvent"></a>

### ResCollection~addEvent : <code>object</code>
Expand All @@ -533,16 +519,16 @@ Add event data
| item | <code>\*</code> | Item being added to the collection. |
| idx | <code>number</code> | Index where item was added. |

<a name="ResCollection..removeCallback"></a>
<a name="ResCollection..addCallback"></a>

### ResCollection~removeCallback : <code>function</code>
Remove event emitted on any item being added to the collection.
### ResCollection~addCallback : <code>function</code>
Add event emitted on any item being added to the collection.

**Kind**: inner typedef of [<code>ResCollection</code>](#ResCollection)

| Param | Type | Description |
| --- | --- | --- |
| event | [<code>removeEvent</code>](#ResCollection..removeEvent) | Remove event data. |
| event | [<code>addEvent</code>](#ResCollection..addEvent) | Add event data. |
| collection | [<code>ResCollection</code>](#ResCollection) | Collection emitting event. |
| event | <code>string</code> | Event name including namespace. |
| action | <code>string</code> | Event action. |
Expand All @@ -560,6 +546,20 @@ Remove event data
| item | <code>\*</code> | Item being removed from the collection. |
| idx | <code>number</code> | Index from where the item was removed. |

<a name="ResCollection..removeCallback"></a>

### ResCollection~removeCallback : <code>function</code>
Remove event emitted on any item being added to the collection.

**Kind**: inner typedef of [<code>ResCollection</code>](#ResCollection)

| Param | Type | Description |
| --- | --- | --- |
| event | [<code>removeEvent</code>](#ResCollection..removeEvent) | Remove event data. |
| collection | [<code>ResCollection</code>](#ResCollection) | Collection emitting event. |
| event | <code>string</code> | Event name including namespace. |
| action | <code>string</code> | Event action. |

<a name="ResModel"></a>

## ResModel
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "resclient",
"version": "2.3.2",
"version": "2.3.3",
"description": "Resgate client implementing the RES-Client Protocol.",
"main": "lib/index.js",
"types": "types/index.d.ts",
Expand Down
22 changes: 11 additions & 11 deletions src/class/ResCollection.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { obj } from 'modapp-utils';

/**
* Add event data
* @typedef {object} ResCollection~addEvent
* @property {*} item Item being added to the collection.
* @property {number} idx Index where item was added.
*/

/**
* Add event emitted on any item being added to the collection.
* @callback ResCollection~addCallback
Expand All @@ -10,10 +17,10 @@ import { obj } from 'modapp-utils';
*/

/**
* Add event data
* @typedef {object} ResCollection~addEvent
* @property {*} item Item being added to the collection.
* @property {number} idx Index where item was added.
* Remove event data
* @typedef {object} ResCollection~removeEvent
* @property {*} item Item being removed from the collection.
* @property {number} idx Index from where the item was removed.
*/

/**
Expand All @@ -25,13 +32,6 @@ import { obj } from 'modapp-utils';
* @param {?string} action Event action.
*/

/**
* Remove event data
* @typedef {object} ResCollection~removeEvent
* @property {*} item Item being removed from the collection.
* @property {number} idx Index from where the item was removed.
*/

/**
* ResCollection represents a collection provided over the RES API.
* @implements {module:modapp~Collection}
Expand Down

0 comments on commit 7012735

Please sign in to comment.