phecda-core 4.4.0 → 4.5.1
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.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -98,6 +98,7 @@ declare function objectToClass<Obj extends Record<string, any>>(obj: Obj): new (
|
|
|
98
98
|
declare function functionToClass<Func extends (...args: any) => object>(fn: Func): new (...args: Parameters<Func>) => ReturnType<Func>;
|
|
99
99
|
declare function omit<Class extends Construct, Key extends keyof InstanceType<Class>>(classFn: Class, ...properties: Key[]): Construct<Omit<InstanceType<Class>, Key>>;
|
|
100
100
|
declare function pick<Class extends Construct, Key extends keyof InstanceType<Class>>(classFn: Class, ...properties: Key[]): Construct<Pick<InstanceType<Class>, Key>>;
|
|
101
|
+
declare function partial<Class extends Construct>(classFn: Class): Construct<Partial<InstanceType<Class>>>;
|
|
101
102
|
declare function partial<Class extends Construct, Key extends keyof InstanceType<Class>>(classFn: Class, ...properties: Key[]): Construct<Partial<Pick<InstanceType<Class>, Key>> & Omit<InstanceType<Class>, Key>>;
|
|
102
103
|
declare function override<Class extends Construct, Key extends keyof InstanceType<Class>>(classFn: Class, ...properties: Key[]): Construct<Omit<InstanceType<Class>, Key>>;
|
|
103
104
|
|
|
@@ -114,8 +115,8 @@ declare abstract class Base {
|
|
|
114
115
|
abstract emitter: any;
|
|
115
116
|
constructor();
|
|
116
117
|
get tag(): PropertyKey;
|
|
117
|
-
init(): void;
|
|
118
|
-
then(cb: () => void, reject?: (e: any) => void): Promise<void>;
|
|
118
|
+
protected init(): void;
|
|
119
|
+
protected then(cb: () => void, reject?: (e: any) => void): Promise<void>;
|
|
119
120
|
on<Key extends keyof Events>(type: Key, handler: (arg: Events[Key]) => void): void;
|
|
120
121
|
emit<Key extends keyof Events>(type: Key, param: Events[Key]): void;
|
|
121
122
|
off<Key extends keyof Events>(type: Key, handler?: (arg: Events[Key]) => void): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -98,6 +98,7 @@ declare function objectToClass<Obj extends Record<string, any>>(obj: Obj): new (
|
|
|
98
98
|
declare function functionToClass<Func extends (...args: any) => object>(fn: Func): new (...args: Parameters<Func>) => ReturnType<Func>;
|
|
99
99
|
declare function omit<Class extends Construct, Key extends keyof InstanceType<Class>>(classFn: Class, ...properties: Key[]): Construct<Omit<InstanceType<Class>, Key>>;
|
|
100
100
|
declare function pick<Class extends Construct, Key extends keyof InstanceType<Class>>(classFn: Class, ...properties: Key[]): Construct<Pick<InstanceType<Class>, Key>>;
|
|
101
|
+
declare function partial<Class extends Construct>(classFn: Class): Construct<Partial<InstanceType<Class>>>;
|
|
101
102
|
declare function partial<Class extends Construct, Key extends keyof InstanceType<Class>>(classFn: Class, ...properties: Key[]): Construct<Partial<Pick<InstanceType<Class>, Key>> & Omit<InstanceType<Class>, Key>>;
|
|
102
103
|
declare function override<Class extends Construct, Key extends keyof InstanceType<Class>>(classFn: Class, ...properties: Key[]): Construct<Omit<InstanceType<Class>, Key>>;
|
|
103
104
|
|
|
@@ -114,8 +115,8 @@ declare abstract class Base {
|
|
|
114
115
|
abstract emitter: any;
|
|
115
116
|
constructor();
|
|
116
117
|
get tag(): PropertyKey;
|
|
117
|
-
init(): void;
|
|
118
|
-
then(cb: () => void, reject?: (e: any) => void): Promise<void>;
|
|
118
|
+
protected init(): void;
|
|
119
|
+
protected then(cb: () => void, reject?: (e: any) => void): Promise<void>;
|
|
119
120
|
on<Key extends keyof Events>(type: Key, handler: (arg: Events[Key]) => void): void;
|
|
120
121
|
emit<Key extends keyof Events>(type: Key, param: Events[Key]): void;
|
|
121
122
|
off<Key extends keyof Events>(type: Key, handler?: (arg: Events[Key]) => void): void;
|
package/dist/index.js
CHANGED
|
@@ -388,7 +388,7 @@ function partial(classFn, ...properties) {
|
|
|
388
388
|
const newClass = class extends classFn {
|
|
389
389
|
};
|
|
390
390
|
getMetaKey(classFn).forEach((k) => {
|
|
391
|
-
if (properties.includes(k))
|
|
391
|
+
if (properties.length === 0 || properties.includes(k))
|
|
392
392
|
addDecoToClass(newClass, k, Optional);
|
|
393
393
|
});
|
|
394
394
|
return newClass;
|
package/dist/index.mjs
CHANGED
|
@@ -309,7 +309,7 @@ function partial(classFn, ...properties) {
|
|
|
309
309
|
const newClass = class extends classFn {
|
|
310
310
|
};
|
|
311
311
|
getMetaKey(classFn).forEach((k) => {
|
|
312
|
-
if (properties.includes(k))
|
|
312
|
+
if (properties.length === 0 || properties.includes(k))
|
|
313
313
|
addDecoToClass(newClass, k, Optional);
|
|
314
314
|
});
|
|
315
315
|
return newClass;
|