Skip to content

Conversation

YukiWorks432
Copy link

@YukiWorks432 YukiWorks432 commented May 12, 2025

#143
Added definition of ElementPlacement.
Accordingly, the type of the argument insertionLocation has been changed to ElementPlacement.

Changed the argument type of insertionLocation to ElementPlacement.
@zlovatt
Copy link
Member

zlovatt commented May 17, 2025

Hi! See the top of the Illustrator typedef files for reference on how to declare enums. It'd be worth checking what the enumerated value equals, too, for accuracy!

Also note that the Illustrator docs have both a 2015.3 and a 2022 version, and this change should be added to both (assuming the enum exists in both)

@YukiWorks432
Copy link
Author

Hi! I tried outputting it with alert, and for example:

alert(ElementPlacement.INSIDE) // shows "ElementPlacement.INSIDE"
alert(typeof ElementPlacement.INSIDE) // shows "object"

so I’m not sure whether it’s actually a string or an object. That’s why I wrote it the way I did but how should I declare it correctly? Sorry, I’m not very familiar with TypeScript…
I don't know if this is correct, but I converted it to enum by specifying a string.

Also, I don’t have an environment to test against Illustrator 2015.3, so I didn’t update that version, but it does look like the enum existed back then. I’ll go ahead and add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants