UNPKG

inngest

Version:

Official SDK for Inngest.com. Inngest is the reliability layer for modern applications. Inngest combines durable execution, events, and queues into a zero-infra platform with built-in observability.

51 lines (49 loc) 1.44 kB
//#region src/components/InngestFunctionReference.ts /** * A reference to an `InngestFunction` that can be used to represent both local * and remote functions without pulling in the full function definition (i.e. * dependencies). * * These references can be invoked in the same manner as a regular * `InngestFunction`. * * To create a reference function, use the {@link referenceFunction} helper. * * @public */ var InngestFunctionReference = class InngestFunctionReference { get [Symbol.toStringTag]() { return InngestFunctionReference.Tag; } constructor(opts) { this.opts = opts; } }; /** * Create a reference to an `InngestFunction` that can be used to represent both * local and remote functions without pulling in the full function definition * (i.e. dependencies). * * These references can be invoked in the same manner as a regular * `InngestFunction`. * * @public */ const referenceFunction = ({ functionId, appId }) => { return new InngestFunctionReference({ functionId, appId }); }; (function(_InngestFunctionReference) { _InngestFunctionReference.Tag = "Inngest.FunctionReference"; })(InngestFunctionReference || (InngestFunctionReference = {})); //#endregion Object.defineProperty(exports, 'InngestFunctionReference', { enumerable: true, get: function () { return InngestFunctionReference; } }); exports.referenceFunction = referenceFunction; //# sourceMappingURL=InngestFunctionReference.cjs.map