Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: export DescriptionType enum values #259

Merged
merged 1 commit into from
Jun 22, 2024

Commits on Jun 14, 2024

  1. fix: export DescriptionType enum values

    At compliation time the values of a `const enum` in TS get changed
    to numbers which breaks JS APIs that expect the string values.
    
    At runtime anything in a `.d.ts` file is not available, so the
    solution is to export enum definitions from the `.d.ts` file as a
    regular `enum` (no `const`) and export the matching values from the
    implementation file as a plain object.
    achingbrain committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    e3437e9 View commit details
    Browse the repository at this point in the history