Closed Davidoseq closed 2 years ago
Hi @Davidoseq ,
For TypeScript projects, please use the below code:
vwoSDK.LogLevelEnum.INFO
It should work.
LogLevelEnum
is exposed and has typings on vwoSDK
.
Hello @softvar, thank you for so fast answer.
Unfortunately, it doesn't help. I get undefined
from enum when i call vwoSDK.LogLevelEnum.INFO
. I updated both example.
Hello @Davidoseq ,
Sorry for the trouble. Actually, LogLevelEnum was earlier available on vwoSDK.logging.LogLevelEnum
but we had typings for TypeScript for vwoSDK.LogLevelEnum
.
We have fixed it. Please update the VWO SDK to 1.30.1
and it should work.
I forked your example, updated the library, and it seems to be working now.
Please verify and let us know:
Closing the issue as it is fixed in the latest versions! Please let us know if you face any problems.
Hello, I am trying to configure Logger using React and Typescript. I used example from documentation.
Unfortunately I am getting an error regarding the logging property. I am trying call
vwoSDK.logging.LogLevelEnum.INFO
but I got TS error:Property 'logging' does not exist on type 'typeof import("vwo-node-sdk")'.ts(2339)
I'm using the last version of the package 1.29.
Here is the example: https://codesandbox.io/s/recursing-tess-41rhy?file=/src/App.tsx
Thank you very much.