String consts/enums in typescript: const, namespace, or class? -


we have enum or set of consts in our project, , pr comment led discussion on idiomatic way of structuring is:

export class thingtypes {   public static readonly thing = "thing";   public static readonly otherthing = "otherthing"; } 

or

export namespace thingtypes {   public static readonly thing = "thing";   public static readonly otherthing = "otherthing"; } 

or

export const thingtypes {   thing: "thing",   otherthing: "otherthing" } 

we not on >=2.4 cannot use enum (as prior 2.4, strings), sake of argument: enum idiomatic way? la:

export enum thingtypes {   public static readonly thing = "thing";   public static readonly otherthing = "otherthing"; } 

the internet not yielding clear answer. idiomatic way , conventional way of making sets of consts in typescript?


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -