Function ejectEnum

  • Ejects enums from all files specified by target.

    Each enum is converted to the safer alternative. for example:

    // before conversion
    enum YesNo {
    No,
    Yes,
    }

    // after conversion
    const YesNo = {
    No: 0,
    Yes: 1,
    } as const;

    type YesNo = typeof YesNo[keyof typeof YesNo];

    Parameters

    Returns void

Generated using TypeDoc