diff --git a/.changeset/twelve-frogs-study.md b/.changeset/twelve-frogs-study.md new file mode 100644 index 0000000000..4935d9343f --- /dev/null +++ b/.changeset/twelve-frogs-study.md @@ -0,0 +1,5 @@ +--- +"@clerk/express": patch +--- + +Expose `AuthObject` type helper diff --git a/packages/express/env.d.ts b/packages/express/env.d.ts new file mode 100644 index 0000000000..f983f87926 --- /dev/null +++ b/packages/express/env.d.ts @@ -0,0 +1,9 @@ +import type { AuthObject } from '@clerk/backend'; + +declare global { + namespace Express { + interface Request { + auth: AuthObject; + } + } +} diff --git a/packages/express/package.json b/packages/express/package.json index c3a4931c29..b7dfedfb6d 100644 --- a/packages/express/package.json +++ b/packages/express/package.json @@ -33,11 +33,13 @@ "default": "./dist/index.js" } }, + "./env": "./env.d.ts", "./package.json": "./package.json" }, "main": "./dist/index.js", "files": [ - "dist" + "dist", + "env.d.ts" ], "scripts": { "build": "npm run clean && tsup",