How to store meta information of properties in a class
问题 I want to associate metadata to properties in classes, specifically abbreviations of property names. With annotations: @shortName(abbreviated) you can tag each property: function shortName(shortName: string){ return function (target: Object, realName: string){ // Where to store the relation realName <-> shortName ?? } } class Record{ @shortName("ts") typeOfStorage: string; } class Client extends Record{ @shortName("df") descriptiveField: string; } function mapNames(obj: any){ // Return object