Skip to content

@clerk/astro/types does not export documented Clerk types #9425

Description

@kritikmodi

Preliminary Checks

Reproduction

N/A

Publishable key

N/A

Description

The Clerk types overview documents importing shared types from @clerk/astro/types:

https://clerk.com/docs/reference/types/overview

import type { UserResource } from '@clerk/astro/types'

I reproduced this with @clerk/astro@4.0.11 and TypeScript 5.9.3.

Steps to reproduce

npm install @clerk/astro@4.0.11 typescript

Create index.ts:

import type { UserResource } from '@clerk/astro/types'

export type Example = UserResource

Run:

npx tsc --noEmit \
  --module NodeNext \
  --moduleResolution NodeNext \
  --target ES2022 \
  index.ts

Actual behavior

TypeScript reports:

error TS2614: Module '"@clerk/astro/types"' has no exported member 'UserResource'.

The package export map currently points ./types to:

./dist/types/index.d.ts

That declaration contains the Astro integration’s default export rather than the shared Clerk types.

The intended declarations appear to be available at:

./dist/types/types/index.d.ts

Expected behavior

The documented type-only import should resolve and compile successfully:

import type { UserResource } from '@clerk/astro/types'

Environment

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions