You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, I added Typescript into my k6 scripts and I'm finding it difficult to extend the __ENV type. There are some __ENV variables I defined to be a number, but Typescript will define the value as a string rather than a number due to this type definition
// global.d.tsdeclare global {const__ENV: {[name: string]: string};}
Is there a way for me to extend the __ENV type definition? One thing I tried was defining my own global.d.ts file with the following:
declare global {namespace__ENV{constVUS: number}}
but that didn't work.
The text was updated successfully, but these errors were encountered:
VUS just happens to be an environment variable I specified for my CI/CD pipeline. I realized I could have used the flag —vus to specify the number of VUs, but there are other environment variables that I would like to specify and they would be of type number. I know I could use “parseInt” to parse the string to a number, but I want to see if there was an option to extend __ENV, unless it’s unnecessary.
Hi guys, I added Typescript into my k6 scripts and I'm finding it difficult to extend the __ENV type. There are some __ENV variables I defined to be a number, but Typescript will define the value as a string rather than a number due to this type definition
Is there a way for me to extend the __ENV type definition? One thing I tried was defining my own global.d.ts file with the following:
but that didn't work.
The text was updated successfully, but these errors were encountered: