Part category non-string value?

Hi Go.js Team,

I try to assign a number value to part.category, and got a non-string error, is there a particular reason why category value has to be a string?


I suppose we could have supported numbers, but it didn’t seem important to do so.

And it is convenient to know that it will always be a string and never a number or null or some Object or Array.

Thanks for the quick response!

The reason I ask is because I am trying to map some enum values pulled from database to different diagram templates, currently I have to convert each enum to string before assign it to part.category, it feels kind of redundancy to me.

I don’t know JavaScript very well, but I thought that properties that are numbers are effectively coerced to strings anyway.