UNPKG

@iterable/react-native-sdk

Version:
36 lines (31 loc) 869 B
"use strict"; import { IterableAction } from "./IterableAction.js"; /** * Information related to an Iterable action. */ export class IterableActionContext { /** * The action associated with the context. */ /** * The origin of the action. In other words, where was the action triggered? */ /** * Creates an instance of IterableActionContext. */ constructor(action, source) { this.action = action; this.source = source; } /** * Creates an instance of `IterableActionContext` from a dictionary object. * * @returns A new instance of `IterableActionContext` with the provided properties. */ static fromDict(dict) { const action = IterableAction.fromDict(dict.action); const source = dict.source; return new IterableActionContext(action, source); } } //# sourceMappingURL=IterableActionContext.js.map