kinde-oss / kinde-auth-nextjs

Kinde NextJS SDK - authentication for server rendered apps
https://kinde.com/docs/developer-tools/nextjs-sdk/
MIT License
132 stars 17 forks source link

Bug: module augmentation fails due to how library publishes types #149

Open Thinkscape opened 2 months ago

Thinkscape commented 2 months ago

Prerequisites

Describe the issue

Steps

In user panel, enable Settings -> Applications -> ... -> Tokens -> Access Token -> Organisation Name (string) Then augment the module to add the missing property:

// i.e. src/types/kinde.d.ts
declare module "@kinde-oss/kinde-auth-nextjs" {
  export type KindeOrganization = {
    orgName: string | null;
  };
}

Expected

KindeOrganization should now contain both orgName and orgCode

Actual

The whole module is now broken, all imports are failing, i.e.

Module '"@kinde-oss/kinde-auth-nextjs"' has no exported member 'useKindeBrowserClient'.ts(2305)

Library URL

https://github.com/kinde-oss/kinde-auth-nextjs

Library version

2.2.3

Operating system(s)

macOS

Operating system version(s)

n/a

Further environment details

Next.js 14.2.2

Reproducible test case URL

No response

Additional information

No response