Looking for selenium’s JavascriptExecutor equivalent in playwright (nodejs)to operate on an element

I want to execute something like this in playwright with typescript –
((JavascriptExecutor)driver).executescript(“return arguments.scrollWidth”,myElement);

((JavascriptExecutor)driver).executescript(“return arguments.scrollWidth”,myElement);
Expecting to get the scroll width