import type { Loose } from '@daysnap/types'; import type { BehaviorOptionsBase, IntersectionBehavior, OptionBehavior, UnwrapBehaviorsType } from './options'; import type { ComponentInstanceProperties, ComponentLifetimes, ComponentOtherOption, ComponentPropertyOption, DataOption, EnsureNonVoid, InstanceMethods, MethodOption, PropertyOptionToData } from './types'; export type BehaviorOtherOption = Partial>; export type BehaviorOptionsInstance, PublicProperty extends ComponentPropertyOption = UnwrapBehaviorsType & EnsureNonVoid, PublicData extends DataOption = UnwrapBehaviorsType & EnsureNonVoid & PropertyOptionToData, PublicMethod extends MethodOption = UnwrapBehaviorsType & EnsureNonVoid> = ComponentInstanceProperties & PublicMethod & { data: Loose; } & InstanceMethods; export type BehaviorOptions = BehaviorOptionsBase & BehaviorOtherOption & Partial & ThisType>; export type CreateBehavior = { __isFragment: string; } & BehaviorOptionsBase & BehaviorOtherOption & Partial; /** * 需要注意 createBehavior 实际返回的是字符串 * 因为需要支持嵌套的 behaviors 所以类型返回具体的 options */ export declare function createBehavior(options?: BehaviorOptions): CreateBehavior;