iron-session
iron-session copied to clipboard
add iron session import to ts definitions
this makes the module augmentation work on files like additional.d.ts
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/vvoyer/iron-session-example/H3VTEcq1jV1k7bmZKgLYFNkj3dSo
✅ Preview: https://iron-session-example-git-fork-avaleriani-patch-1-vvoyer.vercel.app
Hey, @avaleriani thanks for this! I never needed it though, can you link an error you're getting?
Nowadays I use this technique instead: https://github.com/vvo/iron-session/blob/main/examples/next.js-typescript/lib/session.ts
This is the error I'm getting when not importing on types.d.ts
with the approach from your link work perfect, this is only for d.ts files, at least in my next project.
I had the same issue. I have seen it in other projects as well. It happens when the .d.ts
file ends up completely overriding the typings.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
iron-session-example | ✅ Ready (Inspect) | Visit Preview | Aug 25, 2022 at 9:37PM (UTC) |