Create a Path in UXP

Hello,
How can I draw a path in UXP?

I have found examples of this with CEP, but not UXP. I’m not the only one with this question:

I have tried creating a new path with batchPlay then editing the pathContents.pathComponents in the DOM, but the path doesn’t update in Photoshop.

Any help would be greatly appreciated. Thank you!