In addition to creating layers 
https://www.adobe.io/photoshop/uxp/ps_reference/classes/document
const myEmptyLayer = await doc.createLayer()
const myLayer = await doc.createLayer({ name: "myLayer", opacity: 80, mode: "colorDodge" })
For a Text layer, it’s a tad more complex 
Finally:
Note that layerKind is read-only: