import { AnyFunction, AssignAction, Assigner, BaseActionObject, Compute, EventObject, MachineConfig, Prop, PropertyAssigner, StateMachine, InternalMachineOptions, ServiceMap } from './types'; import { ResolveTypegenMeta, TypegenConstraint, TypegenDisabled } from './typegenTypes'; declare type SimplisticExtractEvent = TEvent extends { type: TEventType; } ? TEvent : never; export interface Model { initialContext: TContext; assign: (assigner: Assigner> | PropertyAssigner>, eventType?: TEventType) => AssignAction, TEvent>; events: Prop; actions: Prop; reset: () => AssignAction; createMachine: { (config: MachineConfig, implementations?: InternalMachineOptions>): StateMachine>; }; } export declare type ModelContextFrom> = TModel extends Model ? TContext : never; export declare type ModelEventsFrom | undefined> = TModel extends Model ? TEvent : EventObject; export declare type ModelActionsFrom> = TModel extends Model ? TAction : never; export declare type EventCreator> = Return extends object ? Return extends { type: any; } ? "An event creator can't return an object with a type property" : Self : 'An event creator must return an object'; export declare type EventCreators = { [K in keyof Self]: Self[K] extends AnyFunction ? EventCreator : 'An event creator must be a function'; }; export declare type FinalEventCreators = { [K in keyof Self]: Self[K] extends AnyFunction ? (...args: Parameters) => Compute & { type: K; }> : never; }; export declare type ActionCreator> = Return extends object ? Return extends { type: any; } ? "An action creator can't return an object with a type property" : Self : 'An action creator must return an object'; export declare type ActionCreators = { [K in keyof Self]: Self[K] extends AnyFunction ? ActionCreator : 'An action creator must be a function'; }; export declare type FinalActionCreators = { [K in keyof Self]: Self[K] extends AnyFunction ? (...args: Parameters) => Compute & { type: K; }> : never; }; export interface ModelCreators { events?: EventCreators>; actions?: ActionCreators>; } export interface FinalModelCreators { events: FinalEventCreators>; actions: FinalActionCreators>; } export declare type UnionFromCreatorsReturnTypes = { [K in keyof TCreators]: TCreators[K] extends AnyFunction ? ReturnType : never; }[keyof TCreators]; export {}; //# sourceMappingURL=model.types.d.ts.map