Handling Non-String Environment Variables in ConfigProvider for Cloudflare

Given an env containing not just purely strings (e.g. Cloudflares env containing also the bindings to e.g. R2, KV and the like) how do I best proceed with providing these to the program? Going with something like
    Layer.setConfigProvider(
                ConfigProvider.fromMap(new Map(Object.entries(env))),
            ),

requires the environment to be a Map of <string,string>, doesn't it?
Was this page helpful?