phecda-core 3.0.0-alpha.5 → 3.0.0-alpha.6
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 +1 -1
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare function Ignore(proto: any, key: PropertyKey): void;
|
|
|
30
30
|
declare function Clear(proto: any, key: PropertyKey): void;
|
|
31
31
|
declare function Err<Fn extends (...args: any) => any>(cb: Fn): (proto: any, key: PropertyKey) => void;
|
|
32
32
|
declare function Expose(proto: any, key: PropertyKey): void;
|
|
33
|
-
declare function To(
|
|
33
|
+
declare function To(...callbacks: ((arg: any, instance: any, key: string) => any)[]): (proto: any, key: PropertyKey) => void;
|
|
34
34
|
declare function Tag(tag: string): (module: any) => void;
|
|
35
35
|
declare function Assign(cb: (instance?: any) => any): (module: any) => void;
|
|
36
36
|
declare function Global(module: any): void;
|
package/dist/index.js
CHANGED
|
@@ -361,12 +361,13 @@ function Expose(proto, key) {
|
|
|
361
361
|
setExposeKey(proto, key);
|
|
362
362
|
}
|
|
363
363
|
__name(Expose, "Expose");
|
|
364
|
-
function To(
|
|
364
|
+
function To(...callbacks) {
|
|
365
365
|
return (proto, key) => {
|
|
366
366
|
setVar(proto, key);
|
|
367
367
|
regisHandler(proto, key, {
|
|
368
368
|
async pipe(instance) {
|
|
369
|
-
|
|
369
|
+
for (const cb of callbacks)
|
|
370
|
+
instance[key] = await cb(instance[key], instance, key);
|
|
370
371
|
}
|
|
371
372
|
});
|
|
372
373
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -289,12 +289,13 @@ function Expose(proto, key) {
|
|
|
289
289
|
setExposeKey(proto, key);
|
|
290
290
|
}
|
|
291
291
|
__name(Expose, "Expose");
|
|
292
|
-
function To(
|
|
292
|
+
function To(...callbacks) {
|
|
293
293
|
return (proto, key) => {
|
|
294
294
|
setVar(proto, key);
|
|
295
295
|
regisHandler(proto, key, {
|
|
296
296
|
async pipe(instance) {
|
|
297
|
-
|
|
297
|
+
for (const cb of callbacks)
|
|
298
|
+
instance[key] = await cb(instance[key], instance, key);
|
|
298
299
|
}
|
|
299
300
|
});
|
|
300
301
|
};
|