import { Event, StateValue, ActionType, Action, EventObject, PropertyMapper, Mapper, EventType, HistoryValue, AssignAction, Condition, Subscribable, ConditionPredicate, SCXML, StateLike, EventData, TransitionConfig, TransitionConfigTarget, NullEvent, SingleOrArray, Guard, InvokeSourceDefinition, Observer, Behavior, RaiseActionObject, SendActionObject } from './types'; import { StateNode } from './StateNode'; import { State } from './State'; import { Actor } from './Actor'; import { ActionObject, AnyStateMachine } from '.'; export declare function keys(value: T): Array; export declare function matchesState(parentStateId: StateValue, childStateId: StateValue, delimiter?: string): boolean; export declare function getEventType(event: Event): TEvent['type']; export declare function getActionType(action: Action): ActionType; export declare function toStatePath(stateId: string | string[], delimiter: string): string[]; export declare function isStateLike(state: any): state is StateLike; export declare function toStateValue(stateValue: StateLike | StateValue | string[], delimiter: string): StateValue; export declare function pathToStateValue(statePath: string[]): StateValue; export declare function mapValues>(collection: O, iteratee: (item: O[keyof O], key: keyof O, collection: O, i: number) => P): { [key in keyof O]: P; }; export declare function mapFilterValues(collection: { [key: string]: T; }, iteratee: (item: T, key: string, collection: { [key: string]: T; }) => P, predicate: (item: T) => boolean): { [key: string]: P; }; /** * Retrieves a value at the given path. * @param props The deep path to the prop of the desired value */ export declare const path: >(props: string[]) => any; /** * Retrieves a value at the given path via the nested accessor prop. * @param props The deep path to the prop of the desired value */ export declare function nestedPath>(props: string[], accessorProp: keyof T): (object: T) => T; export declare function toStatePaths(stateValue: StateValue | undefined): string[][]; export declare function pathsToStateValue(paths: string[][]): StateValue; export declare function flatten(array: Array): T[]; export declare function toArrayStrict(value: T[] | T): T[]; export declare function toArray(value: T[] | T | undefined): T[]; export declare function mapContext(mapper: Mapper | PropertyMapper, context: TContext, _event: SCXML.Event): any; export declare function isBuiltInEvent(eventType: EventType): boolean; export declare function isPromiseLike(value: any): value is PromiseLike; export declare function isBehavior(value: any): value is Behavior; export declare function partition(items: T[], predicate: (item: T) => item is A): [A[], B[]]; export declare function updateHistoryStates(hist: HistoryValue, stateValue: StateValue): Record; export declare function updateHistoryValue(hist: HistoryValue, stateValue: StateValue): HistoryValue; export declare function updateContext(context: TContext, _event: SCXML.Event, assignActions: Array>, state?: State): TContext; declare let warn: (condition: boolean | Error, message: string) => void; export { warn }; export declare function isArray(value: any): value is any[]; export declare function isFunction(value: any): value is Function; export declare function isString(value: any): value is string; export declare function toGuard(condition?: Condition, guardMap?: Record>): Guard | undefined; export declare function isObservable(value: any): value is Subscribable; export declare const symbolObservable: typeof Symbol.observable; export declare const interopSymbols: { [Symbol.observable]: () => any; }; export declare function isMachine(value: any): value is AnyStateMachine; export declare function isActor(value: any): value is Actor; export declare const uniqueId: () => string; export declare function toEventObject(event: Event, payload?: EventData): TEvent; export declare function toSCXMLEvent(event: Event | SCXML.Event, scxmlEvent?: Partial>): SCXML.Event; export declare function toTransitionConfigArray(event: TEvent['type'] | NullEvent['type'] | '*', configLike: SingleOrArray | TransitionConfigTarget>): Array & { event: TEvent['type'] | NullEvent['type'] | '*'; }>; export declare function normalizeTarget(target: SingleOrArray> | undefined): Array> | undefined; export declare function reportUnhandledExceptionOnInvocation(originalError: any, currentError: any, id: string): void; export declare function evaluateGuard(machine: StateNode, guard: Guard, context: TContext, _event: SCXML.Event, state: State): boolean; export declare function toInvokeSource(src: string | InvokeSourceDefinition): InvokeSourceDefinition; export declare function toObserver(nextHandler?: Partial> | ((value: T) => void), errorHandler?: (error: any) => void, completionHandler?: () => void): Observer; export declare function createInvokeId(stateNodeId: string, index: number): string; export declare function isRaisableAction(action: ActionObject): action is RaiseActionObject | SendActionObject; //# sourceMappingURL=utils.d.ts.map