UNPKG

@nteract/epics

Version:
47 lines (46 loc) 1.83 kB
/** * This file contains epics associated with processing * particular types of messages returned from and sent to * the Jupyter kernel. */ import { StateObservable } from "redux-observable"; import { Observable } from "rxjs"; import * as actions from "@nteract/actions"; import { AppState } from "@nteract/types"; /** * Process update_display_data messages that are sent from a Jupyter * kernel. This logic is placed in its own epic, as opposed to the core * execution epics because the kernel can send update_display_data messages * at any time. * * @param action$ The stream of actions being dispatched on the Redux store */ export declare const updateDisplayEpic: (action$: Observable<actions.NewKernelAction | actions.KillKernelSuccessful>) => Observable<{ type: "UPDATE_DISPLAY"; payload: import("@nteract/actions/lib/utils").HasContent & { content: { output_type: "update_display_data"; data: import("@nteract/commutable").MediaBundle; metadata: import("@nteract/commutable").JSONObject; transient: { display_id: string; }; }; }; } | { type: "UPDATE_DISPLAY_FAILED"; payload: import("@nteract/actions/lib/utils").HasContent & { error: Error; code?: string | undefined; }; error: true; }>; /** * Send responsese to stdin_requests to the kernel. This epic will * typically be triggered when the user executes an `input()` function * (in Python) then provides a response on the resulting form. * * @param action$ The stream of actions dispatched to the Redux store * @param state$ The stream of changes to the Redux store */ export declare const sendInputReplyEpic: (action$: Observable<actions.SendInputReply>, state$: StateObservable<AppState>) => Observable<never>;