Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Typescript support #151

Closed
keerthivasanm opened this issue Apr 2, 2021 · 3 comments · Fixed by #158
Closed

Typescript support #151

keerthivasanm opened this issue Apr 2, 2021 · 3 comments · Fixed by #158
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@keerthivasanm
Copy link

Is your feature request related to a problem? Please describe.
We have a bunch of mocks as .ts files for other tests and would like use them for mocks-server.

Describe the solution you'd like
Provide a way to configure node to use typescript.

@javierbrea
Copy link
Member

Hi @keerthivasanm,

I think that it is a good idea to support TypeScript as well as ESM syntax. Maybe a good solution for both "problems" could be adding an option for support transforming files with babel/@core internally before loading them, and read the Babel configuration file from the project where Mocks Server is executed, so users can configure it by theirself. Then, a Babel plugin like babel-plugin-transform-typescript could be used to make the transformation from TypeScript.

I will investigate further,

Thanks for your feedback! 🙂

@javierbrea javierbrea transferred this issue from mocks-server/main Apr 11, 2021
@javierbrea javierbrea moved this from To do to In progress in mocks-server Apr 11, 2021
@javierbrea javierbrea added the enhancement New feature or request label Apr 11, 2021
@javierbrea javierbrea self-assigned this Apr 11, 2021
javierbrea added a commit that referenced this issue Apr 12, 2021
javierbrea added a commit that referenced this issue Apr 12, 2021
@javierbrea javierbrea added this to the v2.2.0 milestone Apr 12, 2021
javierbrea added a commit that referenced this issue Apr 12, 2021
@javierbrea
Copy link
Member

Hi again @keerthivasanm,

I have already implemented it and now I'm preparing the new release. You can check how the solution will look like in this new section of the pre-release docs.

I hope to publish it during this week.

@keerthivasanm
Copy link
Author

That was quick turnaround. Thanks @javierbrea. I'm waiting for the release :)

This was referenced Apr 14, 2021
mocks-server automation moved this from In progress to Done Apr 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Status: Done
mocks-server
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants