Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26200] TiAPI: Break out Ti.Media constants to separate namespaces/enum groupings

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsTiAPI
Labelsti.media
ReporterChristopher Williams
AssigneeUnknown
Created2018-07-10T19:58:41.000+0000
Updated2018-07-10T19:58:41.000+0000

Description

Currently we have a practice of grouping an enumeration of possible constant values on the parent module's namespace with some long identical prefix to denote their relationship. This is not a great way to organize the constants. While Javascript does not have a native enum type, we could certainly do a better job by namespacing the related values into a "group" by hanging them off an object. It clutters up the docs/API of the parent module, and leads to super-long ALL_UPPERCASE_SCARY_NAMES_LIKE_THIS. Something similar to: - https://www.sohamkamani.com/blog/2017/08/21/enums-in-javascript/ - https://stackoverflow.com/questions/287903/what-is-the-preferred-syntax-for-defining-enums-in-javascript

Comments

No comments

JSON Source