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
According to the conversation in the Discord server, when trying to use with Typescript the parent of this, understanding that inside a section, the interface is EnhancedSectionInstance, therefore when performing a this.parent it automatically generates an error, since it is understood that the parent is an any.
Suggested solution
Understanding that the parent must have the interface of a section since it is understood to be encapsulating its child, parent should have the EnhancedSectionInstance interface.
Therefore when reviewing the EnhancedPageObjectSharedFields interface, something like this should be added inside its structure
In this way, and testing it locally, this parent property works perfectly, leaving everything in a cleaner way and giving better options to the modularity.
Alternatives / Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Description
According to the conversation in the Discord server, when trying to use with Typescript the parent of this, understanding that inside a section, the interface is EnhancedSectionInstance, therefore when performing a this.parent it automatically generates an error, since it is understood that the parent is an any.
Suggested solution
Understanding that the parent must have the interface of a section since it is understood to be encapsulating its child, parent should have the EnhancedSectionInstance interface.
Therefore when reviewing the EnhancedPageObjectSharedFields interface, something like this should be added inside its structure
In this way, and testing it locally, this parent property works perfectly, leaving everything in a cleaner way and giving better options to the modularity.
Alternatives / Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: