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

Run TypeScript code rather than JavaScript code when available #28

Open
RubenVerborgh opened this issue Dec 30, 2020 · 2 comments
Open
Labels

Comments

@RubenVerborgh
Copy link
Contributor

In case Components.js is run in a situation where the TypeScript sources are available, perhaps it would be interesting to run those instead of the JavaScript. This can save the need to build a project (and also there being 2 versions of code in memory in case other ways of instantiation are used too).

@rubensworks
Copy link
Member

I assume this would be useful for example when running ts-jest?

Should be very feasible to implement using a new creation strategy: https://github.com/LinkedSoftwareDependencies/Components.js/tree/refactor/rdfjs/lib/construction/strategy

@RubenVerborgh
Copy link
Contributor Author

I assume this would be useful for example when running ts-jest?

Indeed!

And here is also an interesting case where I had a failing instanceof check, because the tests were running the TypeScript source but Components.js was instantiating the JavaScript version: CommunitySolidServer/CommunitySolidServer@1cf1167#diff-041823fa178d423e7bd04741d39a3817b6219f2b082109a2d723e5f6a917ec70R59

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

No branches or pull requests

2 participants