New Typescript worker Environmental Variable Not working

#Help Needed

I have initialized a new typescript worker using wrangler. added Env variables using wrangler secret put command but when i try to access the variables in the worker i get an error - variable Not defined. I added bindings.d.ts but nothing changed its been three days now i have no idea what is wrong. Anyone have an idea how to resolve this problem?