Skip to content

Use TS2.4 String enum type #215

Closed
Closed
@appsforartists

Description

@appsforartists

In #155, we abandoned TS enums because their values are hard to debug. microsoft/TypeScript#15486 adds support for string values in enums. When TS2.4 ships, we should port all constant dicts to enums:

enum Axis = {
  X = 'x',
  Y = 'y',
  BOTH = 'both',
}

This also requires going through all places those constants are used and fixing the type, e.g.

axis: PropertyObservable<string> 
// becomes
axis: PropertyObservable<Axis>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions