# Import / Require LayerKind for Photoshop UXP

**URL:** <https://forums.creativeclouddeveloper.com/t/import-require-layerkind-for-photoshop-uxp/3358>\
**Category:** Photoshop\
**Created:** [July 22, 2021, 9:52pm UTC](https://forums.creativeclouddeveloper.com/t/import-require-layerkind-for-photoshop-uxp/3358 "2021-07-22T21:52:49Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![dcotto](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dcotto](https://forums.creativeclouddeveloper.com/u/dcotto)\
**Post date:** [July 23, 2021, 4:17pm UTC](https://forums.creativeclouddeveloper.com/t/import-require-layerkind-for-photoshop-uxp/3358/6 "2021-07-23T16:17:15Z")

</div>

oh wow i see, im surprised its missing. I guess Photoshop UXP is still in a very early stage?  
either way, on my end, when i use:

`document.layers.forEach(layer => console.log(layer.kind);`

it returns a number. What i did for now was just turn that enum from up above to an object

```auto

const LayerKind = {
    "any" : 0,
    "pixel" : 1,
    "adjustment" : 2,
    "text" : 3,
    "vector" : 4,
    "smartObject" : 5,
    "video" : 6,
    "group" : 7,
    "threeD" : 8,
    "gradient" : 9,
    "pattern" : 10,
    "solidColor" : 11,
    "background" : 12,
    "groupEnd" : 13
}

```

It works fine, so if i do

`layer.kind === LayerKind.text`

it works just fine. Still, very strange that i have to create this object… i would assume it was already in UXP. I just hope i dont run into more things that are “not complete”. I have some legacy scripts that are crashing photoshop. need to upgrade. But either way, it works for now. im glad at least i got to the bottom of it. hopefully it will be added soon. Thank you guys for all your help

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/import-require-layerkind-for-photoshop-uxp/3358)._
