Closed MonsterDeveloper closed 2 weeks ago
Latest commit: f6dbb52ed577c0d824601b75a27234d770aaf6a1
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Thanks, @MonsterDeveloper.
I've shifted it to protected
instead, as that should correctly generate the typing needed whilst still only allowing access via ["
instead of .
.
@jpwilliams good point. Made the changes.
Summary
Removed
private
modifier fromcreateExecution
method onInngestFunction
in order to allow calling created functions in the apps that useinngest-js
.When I was researching opportunities on testing my inngest functions, I found out that Inngest already has an option to call the create function that it uses internally for testing:
InngestFunction.createExecution
. It is used the the Inngest's own test files, e.g.InngestFunction.test.ts
It even seems to be working in my setup, if I ignore the type errors.
However, the
createExecution
method is not typed, resulting in very bad DX:To add type definitions to this method, I removed the
private
modifier so that declarations for this method ship with the library, allowing developers to call/test created functions.Checklist
Added a docs PR that references this PRN/A still too raw to add docs for testingAdded unit/integration testsRelated
468