Closed martijnthe closed 11 months ago
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 }
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 noticedinstance.prototype
returnsundefined
so I figuredtypename
would be the second best. I guess I could do a bigif ... else if ....
using a bunch ofinstanceof
s, but this doesn't seem very clean nor efficient.