phecda-core 2.1.1 → 2.1.2-alpha.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/dist/index.d.ts CHANGED
@@ -54,7 +54,7 @@ declare function snapShot<T extends new (...args: any) => any>(data: InstanceTyp
54
54
  declare function addDecoToClass<M extends new (...args: any) => any>(c: M, key: keyof InstanceType<M> | string, handler: ((target: any, key: PropertyKey) => void), type?: 'static' | 'class' | 'normal'): void;
55
55
  declare function Pipeline(...decos: ((...args: any) => void)[]): (...args: any) => void;
56
56
 
57
- declare function isPhecda(target: any): any;
57
+ declare function isPhecda(target: any): boolean;
58
58
  declare function init(target: Phecda): void;
59
59
  declare function regisInitEvent(target: Phecda, key: string): void;
60
60
  declare function getOwnInitEvent(target: Phecda): string[];
package/dist/index.js CHANGED
@@ -77,7 +77,10 @@ module.exports = __toCommonJS(src_exports);
77
77
 
78
78
  // src/core.ts
79
79
  function isPhecda(target) {
80
- return target && !!target.prototype._namespace;
80
+ if (typeof target === "function") {
81
+ return !!target.prototype?._namespace;
82
+ }
83
+ return false;
81
84
  }
82
85
  __name(isPhecda, "isPhecda");
83
86
  function init(target) {
package/dist/index.mjs CHANGED
@@ -3,7 +3,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
3
3
 
4
4
  // src/core.ts
5
5
  function isPhecda(target) {
6
- return target && !!target.prototype._namespace;
6
+ if (typeof target === "function") {
7
+ return !!target.prototype?._namespace;
8
+ }
9
+ return false;
7
10
  }
8
11
  __name(isPhecda, "isPhecda");
9
12
  function init(target) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phecda-core",
3
- "version": "2.1.1",
3
+ "version": "2.1.2-alpha.0",
4
4
  "description": "provide base function and abstract limit to other phecda module ",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",