Skip to content

Commit

Permalink
Fix a TS error when using Inngest in projects with composite setting (
Browse files Browse the repository at this point in the history
#385)

## Summary
<!-- Succinctly describe your change, providing context, what you've
changed, and why. -->
Adds some type exports to `index.ts` that fix a TS error in `composite`
projects.


## Checklist
<!-- Tick these items off as you progress. -->
<!-- If an item isn't applicable, ideally please strikeout the item by
wrapping it in "~~"" and suffix it with "N/A My reason for skipping
this." -->
<!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" -->

- [ ] ~~Added a [docs PR](https://github.com/inngest/website) that
references this PR~~ N/A
- [ ] ~~Added unit/integration tests~~ N/A
- [x] Added changesets if applicable

## Related
Fixes #384

---------

Co-authored-by: Jack Williams <1736957+jpwilliams@users.noreply.github.com>
  • Loading branch information
MonsterDeveloper and jpwilliams committed Nov 7, 2023
1 parent 8c428d5 commit cdf02a3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-experts-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"inngest": patch
---

Add exports for `InngestFunction`, `FunctionTrigger`, and `Handler` types to fix a TypeScript error when using Inngest in projects with `composite` setting in `tsconfig`.
38 changes: 35 additions & 3 deletions packages/inngest/etc/inngest.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/inngest/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type {
} from "./components/Inngest";
export { InngestCommHandler } from "./components/InngestCommHandler";
export type { ServeHandlerOptions } from "./components/InngestCommHandler";
export type { InngestFunction } from "./components/InngestFunction";
export { InngestMiddleware } from "./components/InngestMiddleware";
export type {
MiddlewareOptions,
Expand All @@ -41,6 +42,8 @@ export type {
FailureEventArgs,
FailureEventPayload,
FunctionOptions,
FunctionTrigger,
Handler,
LogLevel,
RegisterOptions,
StepOptions,
Expand Down

0 comments on commit cdf02a3

Please sign in to comment.