Skip to content

Add support for typescript (ts and tsx) #261

Description

@fermuch

After reading #128, I looked around the code of msgfmt:extract and found it's using regexes for parsing files and file extensions.
Since typescript augments vanilla JS, there should be no change to how the regexes for JS/JSX are handled, but I'm a newbie to typescript and might be missing something.

I tried locally to just add ts and tsx extensions, reuse the same parsers of JS and JSX, and it works perfectly in my project. See https://github.com/fermuch/meteor-messageformat for the changes.

Is it okay to add support this way for TS/TSX? If it is, I can rework those changes to create a PR.
Maybe someone else with more knowledge about TS/TSX can point me if there's something I'm missing? CC @tomitrescak

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions