Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reference docs for helper types in TS SDK v3.3.0 #540

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

jpwilliams
Copy link
Member

@jpwilliams jpwilliams self-assigned this Oct 17, 2023
@vercel
Copy link

vercel bot commented Oct 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2023 10:36am

jpwilliams added a commit to inngest/inngest-js that referenced this pull request Oct 17, 2023
…ype (#329)

## Summary
<!-- Succinctly describe your change, providing context, what you've
changed, and why. -->

Adds a `GetStepTools` helper type to go alongside `GetEvents` to provide
users with a way of accessing some of the internal types provided by
Inngest.

```ts
type StepTools = GetStepTools<typeof inngest>;
type StepToolsWithTrigger = GetStepTools<typeof inngest, "app/user.created">;
```

Also provides `GetFunctionInput` to get all input arguments for an
Inngest function.

```ts
type FunctionInput = GetFunctionInput<typeof inngest>;
type FunctionInputWithTrigger = GetFunctionInput<typeof inngest, "app/user.created">;
```

These complement the existing `GetEvents` type available.

```ts
type Events = GetEvents<typeof inngest>;
```

Both types include middleware in the result.

## 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" -->

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

## Related

- inngest/website#540
@jpwilliams jpwilliams merged commit 72a7fca into main Oct 19, 2023
4 checks passed
@jpwilliams jpwilliams deleted the docs/helper-types-reference branch October 19, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant