Closed vemonet closed 1 year ago
Hmm.
I don't think this is a bug. This can be fixed by "fixing" the typing. Currently the interface doesn't know what can be assigned as a type. So it assumes that any string can be put there. We can let typescript know that we want to only "that" particular string by either; assigning the WizardConfig
type to the configuration object, Directly putting the config in the object, Or adding as const
after the refinement types, changing its type from string
to "single"
and "single-param"
.
Yes that was the issue, thanks! This should be commented somewhere, I will add a new "column enrichement" section to the CONFIGURING.md
file
Hi, I am trying to create column refinements the same way I was doing with LDWizard v1, but I am getting errors from typescript
Here is the config for the LDWizard with columns refinements I use in
webpack/runtimeConfig.ts
:I am getting this error when running
yarn dev
:It says that
Types of property 'type' are incompatible. Type 'string' is not assignable to type '"single-param"'.
But that does not seems right because the type for columns refinement is properly defined in the code, the same way as it was for v1.
Could those issues be related to a change in how the TypeScript config is handled by webpack when building the LDWizard instances?
Note that most other configuration I tried (such as changing color and description) works fine. And I am getting the error even when using docker-compose