pacc 9.3.1 → 9.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -279,10 +279,10 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
279
279
 
280
280
  * `type` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
281
281
  * `isKey` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
282
- * `isOwner` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** are we the owner of the value
283
282
  * `writable` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
284
283
  * `mandatory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
285
- * `collection` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
284
+ * `collection` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** are we a collection (set, map, array, object)
285
+ * `owner` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** are we the owner of the value
286
286
  * `constructor` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** (collection) constructor
287
287
  * `private` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** should the value be shown
288
288
  * `credential` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** any type of credential
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacc",
3
- "version": "9.3.1",
3
+ "version": "9.3.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -7,7 +7,7 @@ import { types } from "./types.mjs";
7
7
  * @property {boolean} isKey
8
8
  * @property {boolean} writable
9
9
  * @property {boolean} mandatory
10
- * @property {boolean} collection are we a collection (set, map, array)
10
+ * @property {boolean} collection are we a collection (set, map, array, object)
11
11
  * @property {boolean} owner are we the owner of the value
12
12
  * @property {Function} [constructor] (collection) constructor
13
13
  * @property {boolean} [private] should the value be shown
package/src/types.mjs CHANGED
@@ -124,17 +124,16 @@ function raiseOnUnknownType(type, origin) {
124
124
  }
125
125
 
126
126
  export function addType(type) {
127
- switch (typeof type.extends) {
128
- case "undefined":
129
- const ex = Object.getPrototypeOf(type.clazz || type);
127
+ if (typeof type.extends === "string") {
128
+ type.extends = raiseOnUnknownType(type.extends, type);
129
+ } else {
130
+ if (type.extends === undefined || !type.hasOwnProperty("extends")) {
131
+ const ex = Object.getPrototypeOf(type);
132
+
130
133
  if (ex?.name) {
131
134
  type.extends = ex;
132
135
  }
133
- break;
134
-
135
- case "string":
136
- type.extends = raiseOnUnknownType(type.extends, type);
137
- break;
136
+ }
138
137
  }
139
138
 
140
139
  if (type.specializationOf) {
@@ -5,7 +5,7 @@
5
5
  * @property {boolean} isKey
6
6
  * @property {boolean} writable
7
7
  * @property {boolean} mandatory
8
- * @property {boolean} collection are we a collection (set, map, array)
8
+ * @property {boolean} collection are we a collection (set, map, array, object)
9
9
  * @property {boolean} owner are we the owner of the value
10
10
  * @property {Function} [constructor] (collection) constructor
11
11
  * @property {boolean} [private] should the value be shown
@@ -233,7 +233,7 @@ export type AttributeDefinition = {
233
233
  writable: boolean;
234
234
  mandatory: boolean;
235
235
  /**
236
- * are we a collection (set, map, array)
236
+ * are we a collection (set, map, array, object)
237
237
  */
238
238
  collection: boolean;
239
239
  /**