•  
      request #20917 Ban TypeScript Enums syntax
    Infos
    #20917
    Joris MASSON (jmasson)
    2021-04-29 15:10
    2021-04-13 15:05
    22509
    Details
    Ban TypeScript Enums syntax

    Enums have been a part of TypeScript ever since we started adopting it in Tuleap development. Naturally, we started using them. There is a TC39 Proposal to add this syntax to the ECMAScript specification. However, at the time of writing this document, the proposal has not moved from stage zero since 2018. Enums might never be added to ECMAScript... Moreover, the TypeScript Documentation itself advises to "maybe hold off on using [Enums]".

    Additionally, Enums produce more runtime code than simpler alternatives.

    I suggest therefore to ban Enums usage with an eslint rule, with an ADR to explain it.

    Other
    Empty
    Empty
    • [ ] enhancement
    • [x] internal improvement
    Empty
    Stage
    Joris MASSON (jmasson)
    Closed
    2021-04-29
    Attachments
    Empty
    References

    Follow-ups