phecda-core 3.0.0-alpha.1 → 3.0.0-alpha.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/dist/index.d.ts +3 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ interface NameSpace {
|
|
|
4
4
|
interface InjectData {
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
}
|
|
7
|
+
type Construct<T = any> = new (...args: any[]) => T;
|
|
7
8
|
interface Handler {
|
|
8
9
|
[key: string]: any;
|
|
9
10
|
}
|
|
@@ -53,7 +54,7 @@ declare function snapShot<T extends new (...args: any) => any>(data: InstanceTyp
|
|
|
53
54
|
declare function addDecoToClass<M extends new (...args: any) => any>(c: M, key: keyof InstanceType<M> | string, handler: ((target: any, key: PropertyKey) => void), type?: 'property' | 'class'): void;
|
|
54
55
|
declare function Pipeline(...decos: ((...args: any) => void)[]): (...args: any) => void;
|
|
55
56
|
|
|
56
|
-
declare function isPhecda(module: any):
|
|
57
|
+
declare function isPhecda(module: any): module is Construct;
|
|
57
58
|
declare const SHARE_KEY: unique symbol;
|
|
58
59
|
declare function init(proto: Phecda): void;
|
|
59
60
|
declare function setVar(proto: Phecda, key: PropertyKey): void;
|
|
@@ -82,4 +83,4 @@ declare function Watcher(eventName: keyof Events, options?: {
|
|
|
82
83
|
declare function Effect(eventName: string, options?: any): (proto: any, key: string) => void;
|
|
83
84
|
declare function Storage(storeKey?: string): (proto: any, key?: PropertyKey) => void;
|
|
84
85
|
|
|
85
|
-
export { Assign, Bind, ClassValue, Clear, DataMap, Effect, Empty, Err, Events, Expose, Global, Handler, Ignore, Init, Inject, InjectData, NameSpace, Nested, Phecda, Pipeline, Provide, SHARE_KEY, Storage, Tag, To, Watcher, activeInstance, addDecoToClass, classToValue, getBind, getExposeKey, getHandler, getModuleState, getOwnExposeKey, getOwnHandler, getOwnIgnoreKey, getOwnModuleState, getOwnState, getProperty, getState, getSymbol, getTag, init, injectProperty, isPhecda, plainToClass, regisHandler, register, registerAsync, setExposeKey, setIgnoreKey, setState, setVar, snapShot, transformClass };
|
|
86
|
+
export { Assign, Bind, ClassValue, Clear, Construct, DataMap, Effect, Empty, Err, Events, Expose, Global, Handler, Ignore, Init, Inject, InjectData, NameSpace, Nested, Phecda, Pipeline, Provide, SHARE_KEY, Storage, Tag, To, Watcher, activeInstance, addDecoToClass, classToValue, getBind, getExposeKey, getHandler, getModuleState, getOwnExposeKey, getOwnHandler, getOwnIgnoreKey, getOwnModuleState, getOwnState, getProperty, getState, getSymbol, getTag, init, injectProperty, isPhecda, plainToClass, regisHandler, register, registerAsync, setExposeKey, setIgnoreKey, setState, setVar, snapShot, transformClass };
|