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

feat!: expose language metadata as const #1111

Merged
merged 2 commits into from
Jul 12, 2023
Merged

Commits on Jul 6, 2023

  1. feat!: expose language metadata as const

    Exposing the LanguageMetadata as const with satisfies allows the values of
    its members like `languageId` or `fileExtensions` to be exposed statically.
    This allows for patterns like
    ```
    type MyFileExtensions = typeof MyFancyDSLLanguageMetaData.fileExtensions
    ```
    Where then MyFileExtensions is not typed to a generic `string[]`
    but to `['.myDsl']` which makes it easier to avoid mistakes.
    
    Unfortunately this is a breaking change because it requires the fileExtensions
    on the LanguageMetaData to be readonly to work.
    coolya committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    4556bd8 View commit details
    Browse the repository at this point in the history
  2. update generated files

    coolya committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    a1aeb1b View commit details
    Browse the repository at this point in the history