From 008d9719024cf0f31e04f1160296052023dc55fa Mon Sep 17 00:00:00 2001 From: Jack Williams Date: Thu, 16 Jan 2025 08:56:10 +0000 Subject: [PATCH] Allow typings for `InngestFunction["client"]` (#803) ## Summary Allows typings to be published for `myFn["client"]`. ## Checklist - [ ] ~Added a [docs PR](https://github.com/inngest/website) that references this PR~ N/A Abstract change - [ ] ~Added unit/integration tests~ N/A - [x] Added changesets if applicable --- .changeset/dirty-poets-begin.md | 5 +++++ packages/inngest/src/components/InngestFunction.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/dirty-poets-begin.md diff --git a/.changeset/dirty-poets-begin.md b/.changeset/dirty-poets-begin.md new file mode 100644 index 000000000..70237f887 --- /dev/null +++ b/.changeset/dirty-poets-begin.md @@ -0,0 +1,5 @@ +--- +"inngest": patch +--- + +`myFn["client"]` is now typed diff --git a/packages/inngest/src/components/InngestFunction.ts b/packages/inngest/src/components/InngestFunction.ts index 6744f4cee..c868df84a 100644 --- a/packages/inngest/src/components/InngestFunction.ts +++ b/packages/inngest/src/components/InngestFunction.ts @@ -53,7 +53,7 @@ export class InngestFunction< public readonly opts: TFnOpts; private readonly fn: THandler; private readonly onFailureFn?: TFailureHandler; - private readonly client: TClient; + protected readonly client: TClient; private readonly middleware: Promise; /**