My file is very simple, however I feel it should be simpler still...
type wevs = "xxxs"|"xxs"|"xs"|"sm"|"md"|"lg"|"xl"|"xxl"|"xxxl"
export default wevs
How do I write this without the "wevs" ?
CodePudding user response:
It is impossible to do in TypeScript. The rules are simple. In order to use some type you should declare it using either type or interface. You can also use enum, namespace and class keywords for declaring a type but these are not erased from the bundle.
There are no alternative ways of using type signature without declaring the name.
