interface IComponentOptions { onInit?: () => void; didUnmount?: () => void; } type ExtendedInstanceMethods = Partial & Record; export declare const ComponentWithSignalStoreImpl: unknown>, Props, Methods = unknown, Data = unknown, Mixins = unknown, InstanceMethods extends ExtendedInstanceMethods = ExtendedInstanceMethods>({ storeOptions, props: defaultProps, methods, data, mixins, ...instanceMethods }: { storeOptions?: TStoreOptions; props?: Props; methods?: Methods; data?: Data; mixins?: any; } & InstanceMethods) => void; type TMapState = Record unknown>; export type TStoreOptions> = { /** * store 的创建器,因为页面会有多实例,所以 store 必须每个页面实例单独创建一次 * 如果你非要多个实例共用一个 store,那你可以 const store = new Store(); store: => store; */ store: () => S; /** * store 数据更新后的 listener,通过它来触发向页面数据的同步,返回值是一个 dispose 函数。 * 在 mobx 是 autorun、redux 是 subscribe、你要不在意性能,setInterval 也可以 */ updateHook: (fn: () => void) => () => void; /** * store 数据到页面 data 的映射关系 */ mapState: M; }; export type TStoreInitOptions = { setData: (o: Record, callback?: () => void) => void; $store?: S; }; export declare class StoreBinder> { private storeOptions; private disposeStore?; constructor(storeOptions: TStoreOptions); /** * 绑定和 store 的关系 */ init(theThis: TStoreInitOptions): void; /** * 释放和 store 的关系 */ dispose(): void; } declare function ComponentImpl({ props: defaultProps, data, methods, mixins, ...instanceMethods }: { props?: Props; data?: Data; methods?: Methods; mixins?: Mixins & any; } & InstanceMethods): void; export interface IPlatformEvent { currentTarget: { dataset: Record; }; target: { dataset: Record; }; } export declare function triggerEvent(instance: any, eventName: string, value: unknown, e?: any): void; export declare function triggerEventOnly(instance: any, eventName: string, e?: any): void; export declare function triggerEventValues(instance: any, eventName: string, values: any[], e?: any): void; export declare function triggerCatchEvent(instance: any, eventName: string, e?: any): void; export declare function getValueFromProps(instance: any, propName?: string | string[]): any; export { ComponentWithSignalStoreImpl as ComponentWithSignalStore, ComponentImpl as Component, };