Skip to content

Commit

Permalink
revert: extend regular next-auth module (t3-oss#257)
Browse files Browse the repository at this point in the history
* revert: extend regular next-auth module

* refactor: move typedefs to `src/types`

Co-authored-by: Shoubhit Dash <[email protected]>
  • Loading branch information
juliusmarminge and nexxeln authored Jul 27, 2022
1 parent 9b6c142 commit f5ff6d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/installers/next-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export const nextAuthInstaller: Installer = async ({
);

const nextAuthDefinitionSrc = path.join(nextAuthAssetDir, "next-auth.d.ts");
const nextAuthDefinitionDest = path.join(projectDir, "next-auth.d.ts");
const nextAuthDefinitionDest = path.join(
projectDir,
"src/types/next-auth.d.ts",
);

await Promise.all([
fs.copy(apiHandlerSrc, apiHandlerDest),
Expand Down
3 changes: 1 addition & 2 deletions template/addons/next-auth/next-auth.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { DefaultSession } from "next-auth";

/** @see https://github.com/microsoft/TypeScript/issues/12607#issuecomment-502362381 */
declare module "next-auth/core/types" {
declare module "next-auth" {
/**
* Returned by `useSession`, `getSession` and received as a prop on the `SessionProvider` React Context
*/
Expand Down

0 comments on commit f5ff6d2

Please sign in to comment.