phecda-core 4.1.0 → 4.2.0

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
@@ -1,3 +1,3 @@
1
- # phecda-core
2
- provide base function and abstract limit to other phecda module
3
-
1
+ # phecda-core
2
+ provide base function and abstract limit to other phecda module
3
+
package/dist/index.d.mts CHANGED
@@ -112,6 +112,7 @@ declare abstract class Base {
112
112
  abstract emitter: any;
113
113
  constructor();
114
114
  get tag(): PropertyKey;
115
+ init(): void;
115
116
  then(cb: () => void, reject?: (e: any) => void): Promise<void>;
116
117
  on<Key extends keyof Events>(type: Key, handler: (arg: Events[Key]) => void): void;
117
118
  emit<Key extends keyof Events>(type: Key, param: Events[Key]): void;
package/dist/index.d.ts CHANGED
@@ -112,6 +112,7 @@ declare abstract class Base {
112
112
  abstract emitter: any;
113
113
  constructor();
114
114
  get tag(): PropertyKey;
115
+ init(): void;
115
116
  then(cb: () => void, reject?: (e: any) => void): Promise<void>;
116
117
  on<Key extends keyof Events>(type: Key, handler: (arg: Events[Key]) => void): void;
117
118
  emit<Key extends keyof Events>(type: Key, param: Events[Key]): void;
package/dist/index.js CHANGED
@@ -117,7 +117,8 @@ function getPhecdaFromTarget(target) {
117
117
  function setMeta(proto, property, index, meta) {
118
118
  if (!property) {
119
119
  property = SHARE_KEY;
120
- proto = proto.prototype;
120
+ if (proto.prototype)
121
+ proto = proto.prototype;
121
122
  }
122
123
  init(proto);
123
124
  if (!proto[PHECDA_KEY].__META__.has(property))
@@ -518,6 +519,8 @@ var Base = class {
518
519
  get tag() {
519
520
  return getTag(this);
520
521
  }
522
+ init() {
523
+ }
521
524
  then(cb, reject) {
522
525
  return this.__PROMISE_SYMBOL__.then(cb, reject);
523
526
  }
@@ -539,6 +542,9 @@ var Base = class {
539
542
  return Promise.all(this.__UNMOUNT_SYMBOL__.map((fn) => fn()));
540
543
  }
541
544
  };
545
+ __decorateClass([
546
+ Init
547
+ ], Base.prototype, "init", 1);
542
548
  __decorateClass([
543
549
  Unmount
544
550
  ], Base.prototype, "_unmount", 1);
package/dist/index.mjs CHANGED
@@ -40,7 +40,8 @@ function getPhecdaFromTarget(target) {
40
40
  function setMeta(proto, property, index, meta) {
41
41
  if (!property) {
42
42
  property = SHARE_KEY;
43
- proto = proto.prototype;
43
+ if (proto.prototype)
44
+ proto = proto.prototype;
44
45
  }
45
46
  init(proto);
46
47
  if (!proto[PHECDA_KEY].__META__.has(property))
@@ -441,6 +442,8 @@ var Base = class {
441
442
  get tag() {
442
443
  return getTag(this);
443
444
  }
445
+ init() {
446
+ }
444
447
  then(cb, reject) {
445
448
  return this.__PROMISE_SYMBOL__.then(cb, reject);
446
449
  }
@@ -462,6 +465,9 @@ var Base = class {
462
465
  return Promise.all(this.__UNMOUNT_SYMBOL__.map((fn) => fn()));
463
466
  }
464
467
  };
468
+ __decorateClass([
469
+ Init
470
+ ], Base.prototype, "init", 1);
465
471
  __decorateClass([
466
472
  Unmount
467
473
  ], Base.prototype, "_unmount", 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phecda-core",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "provide base function and abstract limit to other phecda module ",
5
5
  "author": "fgsreally",
6
6
  "license": "MIT",