Skip to content

Use only erasable syntax #14

@c100k

Description

@c100k

Problem

A project made with the library is not runnable with Node.js' --experimental-strip-types flag. Indeed, it contains non erasable syntax like enums. Therefore, a project absolutely needs to be transpiled before being executed.

See https://www.totaltypescript.com/erasable-syntax-only.

Potential Solution(s)

Replace all the non erasable syntax. These are mostly enums and class parameter properties as there is no namespace usage.

Enums could be replaced by union types and class parameter properties by regular class parameters declared outside the constructor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions