this is a simple exmaple UX plugin document generator. it makes template document from class Object. just I'd like to show how write modern code on Photoshop UXP. more details below.
the class recieves args like width , height ... as a option of document. and it makes document , layers , draws guides omn document.
LayerObj and LayerSetObj create layer and it will get layer itself from native Photoshop app after it made layer from method. layerSetObj . it's a group layer Object so it has to have layers as a property.