diff --git a/.changeset/beige-colts-do.md b/.changeset/beige-colts-do.md new file mode 100644 index 000000000..ef9c568c3 --- /dev/null +++ b/.changeset/beige-colts-do.md @@ -0,0 +1,5 @@ +--- +"inngest": patch +--- + +Fix required type annotation typescript errors; `inngest/types` is now exported with a warning within the module covering its usage diff --git a/packages/inngest/jsr.json b/packages/inngest/jsr.json index 54e601f06..7d9c5edc7 100644 --- a/packages/inngest/jsr.json +++ b/packages/inngest/jsr.json @@ -33,6 +33,7 @@ "./remix": "./src/remix.ts", "./sveltekit": "./src/sveltekit.ts", "./deno/fresh": "./src/deno/fresh.ts", - "./hono": "./src/hono.ts" + "./hono": "./src/hono.ts", + "./types": "./src/types.ts" } -} \ No newline at end of file +} diff --git a/packages/inngest/package.json b/packages/inngest/package.json index 81bcaa4f2..43521a602 100644 --- a/packages/inngest/package.json +++ b/packages/inngest/package.json @@ -122,6 +122,11 @@ "import": "./hono.js", "types": "./hono.d.ts" }, + "./types": { + "require": "./types.js", + "import": "./types.js", + "types": "./types.d.ts" + }, "./api/*": "./api/*.js", "./components/*": "./components/*.js", "./deno/*": "./deno/*.js", diff --git a/packages/inngest/src/types.ts b/packages/inngest/src/types.ts index bb1ff516d..6892c8623 100644 --- a/packages/inngest/src/types.ts +++ b/packages/inngest/src/types.ts @@ -1,3 +1,14 @@ +/** + * Internal types and schemas used throughout the Inngest SDK. + * + * Note that types intended to be imported and utilized in userland code will be + * exported from the main entrypoint of the SDK, `inngest`; importing types + * directly from this file may result in breaking changes in non-major bumps as + * only those exported from `inngest` are considered stable. + * + * @module + */ + import { z } from "zod"; import { type EventSchemas } from "./components/EventSchemas"; import {