You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I usually write all my projects in typescript and indeed elderjs has nice support for typescipt in most cases, but I can't make it work to write elderjs routes in typescript.
Changing routes.js to routes.ts makes it so elderjs doesn't see this route file.
From what i've seen in elderjs code all references to finding routes have hardcoded *.js extensions without mention of *.ts option.
Does it mean there is no way to write elderjs project in 100% typescript?
The text was updated successfully, but these errors were encountered:
That does sound right. I wasn’t a huge TS user when I wrote Elder.js and all of my projects use JS currently.
For a while we checked the dist folder defined in the tsconfig when files weren’t found but that support got dropped pre 1.0 IIRC.
I’d love to have support for this but can’t commit to developing it myself. This should be a relatively straight forward PR though. Simply check the tsconfig for the distdir and update the appropriate fields in getConfig.ts.
Happy to review a PR for this if you or someone else wants to tackle it.
I usually write all my projects in typescript and indeed elderjs has nice support for typescipt in most cases, but I can't make it work to write elderjs routes in typescript.
Changing
routes.js
toroutes.ts
makes it so elderjs doesn't see this route file.From what i've seen in elderjs code all references to finding routes have hardcoded
*.js
extensions without mention of*.ts
option.Does it mean there is no way to write elderjs project in 100% typescript?
The text was updated successfully, but these errors were encountered: