Types-for-Adobe
Types-for-Adobe copied to clipboard
`typename` fields are missing (at least for Illustrator)
The JS API doc of Illustrator (2017) contains typename fields for almost (if not all) classes.
Theses are missing from the .d.ts. I guess they're missing from the .xml definitions too? Should I open a PR for this?
I'm trying to figure out the best way to switch based on the subclass. I noticed instance.prototype returns undefined so I figured typename would be the second best. I guess I could do a big if ... else if .... using a bunch of instanceofs, but this doesn't seem very clean nor efficient.
open pr
Closed as these are present in the .d.ts files in this repo.
Consider to reopen... not present in Color parent class. It causes problems when doing switch statements using swatch colors and doing conditional logic off Color instances typename.
Shouldn't declare class Color{} have: declare class Color{ typename: string }