Closed raoufswe closed 1 year ago
Hey @raoufswe, thanks for creating the issue. I think there is something wrong with the types on my end. Will let you know when this is fixed.
It is probably related to line 46: https://github.com/sand4rt/playwright-ct-web/blob/master/playwright-ct-web/index.d.ts
thank you @sand4rt. in case it helps, I have used this workaround on my end for now please let me know if you need any more details or help 💯
Hey @raoufswe, this should be fixed when you upgrade to the latest version. An example/starting point can be found here: https://github.com/justeattakeaway/pie/pull/660/files
thank you @sand4rt for your swift action, we will upgrade to the latest version 💯
Closing as per above, please feel free to open a new issue if this does not fix the type error.
not really sure if this is a typing issue or I'm missing something but when all properties of a web component are marked as optional such as the following:
and your test looks like the following:
typescript will throw the following error:
we've faced this issue in most of our components at https://github.com/justeattakeaway/pie and our workaround is to use type assertion or wrap the props with
Partial
such as here but unfortunately this wouldn't work as we have a component that marks all of its properties as optional and you will get the following by doing so as nothing is in common between both types.