KV namespace object exposed, but obj functions return error

For Workes & Pages, what is the name of the domain?

example.com

What is the issue or error you’re encountering

can’t access kv namespace functions

What steps have you taken to resolve the issue?

i’ve put

kv_namespaces = [
{ binding = “macs_ns”, id = “myidhere” }
]
in wrangler.toml

I’ve put binding variable at the worker settings

I call it with env.mykv.put(1,1) and I get error
undefined (reading ‘put’)

When I did console.log(env.mykv) it actually returned the KV object in the console and it is really strange
that I couldn’t access put, get or whatever by the aforementioned error.

After 1 hour with doing nothing console.long(env.mykv) now return undefined… really really strange.

Please ignore the binding = “macs_ns”… it is = “mykv”

I have to answer it myself…
turns out (nowhere described) that the access of the kv object can happen only by the alternative method by using the brackets [“funchere”].