Skip to content

Commit

Permalink
fix(inngest): add JsonError export from types (#687)
Browse files Browse the repository at this point in the history
## Summary
<!-- Succinctly describe your change, providing context, what you've
changed, and why. -->

Added an export for `JsonError` type to `index.ts` from `types`.


## 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 bug fix
- [ ] ~~Added unit/integration tests~~ N/A only touches types
- [x] Added changesets if applicable

## Related
Fixes #686

---------

Co-authored-by: Jack Williams <1736957+jpwilliams@users.noreply.github.com>
Co-authored-by: Jack Williams <jack@inngest.com>
  • Loading branch information
3 people authored Aug 29, 2024
1 parent fbb87a8 commit 9f0bdc6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-knives-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"inngest": patch
---

Add exports for `JsonError` type to fix a TypeScript error when using Inngest in projects with `composite` setting in `tsconfig`.
1 change: 1 addition & 0 deletions packages/inngest/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export type {
FailureEventPayload,
FinishedEventPayload,
Handler,
JsonError,
LogLevel,
OutgoingOp,
RegisterOptions,
Expand Down
3 changes: 3 additions & 0 deletions packages/inngest/test/composite_project/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import * as Inngest from "inngest";

// Prove certain types are exported and can be used
type CatchAll = Inngest.JsonError;

export const inngest = new Inngest.Inngest({
id: "me",
schemas: new Inngest.EventSchemas().fromRecord<{
Expand Down

0 comments on commit 9f0bdc6

Please sign in to comment.