Skip to content

Singleton enums are not typed properly #231

Closed

Description

@rix0rrr

An enum with a single value is type-inferred by TSC to be some thing that we have no support for.

I looked into it for a bit, it's not trivial to extend it though.

Activity

  1. RomainMuller commented on Sep 17, 2018

    @RomainMuller
    Contributor

    @rix0rrr do you have a concrete case where a single-entry enum is used?

  2. rix0rrr commented on Sep 17, 2018

    @rix0rrr
    ContributorAuthor
  3. jogold commented on Mar 1, 2019

    @jogold

    An example in @aws-cdk/aws-ec2 is the type of VPN connection. Currently, the only valid value is ipsec.1.

    See the discussion with @eladb here aws/aws-cdk#1899 (comment).

  4. added a commit that references this issue on Jun 13, 2019
    907df8f
  5. added 5 commits that reference this issue on Jun 14, 2019
    01aed03
    6e1b2d1
    3b807fb
    4bf84ad
    464b8c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions