I want to expoort string contsnt but in such way that it would be inlined in all places it is used it and variable von't be created. I know it's possible with const enum
:
const enum SomeEnum {
SOME_VALUE = "SOME_VALUE"
}
alert(SomeEnum.SOME_VALUE);
compiles into
"use strict";
alert("SOME_VALUE" /* SOME_VALUE */);
But I'm interested in making dotless access to the value, i. e. I want to write
alert(SOME_VALUE);
and I want it to be compiles into the same thing.
How can I declare SOME_VALUE
to archive that?