Closed UnbreakableKid closed 1 year ago
Works perfectly on my side with Zod. Just tried it right now
Maybe just try restarting your TS server / reloading IDE ? Otherwise feel free to share a fresh repo that reproduce the issue but it seems to me it's an issue with your setup
Also make sure that your env.d.ts
is located into your ./src
directory and not at the top level
Please also share your zod version
I have apparently fixed it. I tried moving the env.d.ts to the root of the project and then it works. When it's at the src it does not.
outside of src
inside of src
zod version is 3.21.4
Hi, this might be a noob mistake but I'm trying and failing to make this work 100% and I might be missing a step.
I have created the standalone env.ts and the env.d.ts files in the src directory. When I'm using the import.meta.... I only get intellisense for the default env vars and not my new ones. When I do use them, I get an any type.
env.d.ts![image](https://user-images.githubusercontent.com/29483407/224689755-48e4595b-a61c-43a9-8abd-c81371478024.png)
env.ts![image](https://user-images.githubusercontent.com/29483407/224689822-ede61816-62a4-4e95-83ae-a18c765b6d25.png)
import in another .ts file![image](https://user-images.githubusercontent.com/29483407/224689941-ec7f2197-25a4-44b6-9a24-9065cf1ba31a.png)