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

Opinion on converting the addon to ES6/Typescript? #227

Closed
cibernox opened this issue Feb 2, 2018 · 6 comments · Fixed by #317
Closed

Opinion on converting the addon to ES6/Typescript? #227

cibernox opened this issue Feb 2, 2018 · 6 comments · Fixed by #317

Comments

@cibernox
Copy link
Contributor

cibernox commented Feb 2, 2018

I'd like to update pretender to work with fetch but as it is right now the codebase feels a messy (read: I'm so used to ES6 I can't even read Pretender.prototype. anymore).

I'm thinking that a good plan could be to add a build that compiles the sourcecode with babel (perhaps even TS). That would also make easier to accomplish any refactor with certain guarantees.

Would you favor a re-write in ES6 or TS (+ drop Phantomjs?)

@cibernox
Copy link
Contributor Author

cibernox commented Feb 2, 2018

/cc @trek @rwjblue @samselikoff

@samselikoff
Copy link
Contributor

I'd defer to @trek, fine by me but I haven't worked on the source. Fwiw I want to do something like this in Mirage soonish too.

@givanse
Copy link
Contributor

givanse commented Dec 28, 2018

Some work has been done:

TypeScript type definitions #223

@givanse
Copy link
Contributor

givanse commented Dec 30, 2018

I've opened:

Add a build step and produce ES and CJS files. #240

@givanse
Copy link
Contributor

givanse commented Apr 28, 2019

Since v3.0.1 native ES6 classes are distributed. I think this issue can be closed now.

@xg-wang
Copy link
Member

xg-wang commented Apr 24, 2021

It is distributed as ES module, but I think @cibernox also mentioned pretender source should also be written in TS/es6+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants