-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
TypeScript Example (CJS) #4942
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
base: 5.0
Are you sure you want to change the base?
TypeScript Example (CJS) #4942
Conversation
|
Nice, seems to have passed |
|
@bozzelliandrea, thank you for the feedback; I've since updated with your recommended changes, and point of replacing Sorry my response took so long, I'll try and get back sooner next time around P.S. I updated the Using |
- Updated `README.md` to better reflect context - Removed unnecessary instruction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Segmentational everything looks ok and clean, nice work! 😃
Just my curiosity, what does CJS mean?
@bozzelliandrea, sorry for the delayed response... I just moved halfway across the united states, so that took a little time haha. Yeah, " I'm unsure of the exact other places, but essentially it's a shorthand sometimes used to describe the |
|
Hello! So it's been quite some time, but I have a colleague who was looking for a simple TS example. I got curious, and remembered this PR. Are there any outstanding issues? It's likely the @dougwilson, are you still the maintainer here? One question: is this example outside the scope of the project? I have no issue closing this PR if there isn't interest in a typescript example. But if there is, maybe we can reconsider a merge at some future release point. Edit*: Last note, there's also a committed artifact, which is incorrect. the gitignore should be updated before this would get merged, but again, if there isn't any interest in typescript here -- we should just close this before any more work is done |
The following PR relates to a simple TypeScript implementation using
express@5.0.Additionally, example (found in
examples/typescript) includes atsconfig.jsonthat compiles down toES5JavaScript. A merge request I made previously had failed some tests relating to version limitations (node), so this should handle that case.However, the compiled JavaScript and other generated assets are set to be tracked via VCS (
git). It's of normal operation to usually untrack them via including*.jsin the.gitignore.We can later add a
.gitignorein the example folder itself. But I do want to see what the GitHub actions returns with. If appropriate, I'll update/discuss changes to these tests to account for the typescript example.Discussion
Looking at the other example folders, often they are without
README.mds,package.jsons, etc. etc.While totally fine, the example this PR relates to, as well as another I have outstanding, perhaps could be exceptions. I know the package maintainers and other contributors see, almost daily, issues & questions relating to ESM, TypeScript, and even both.
Providing examples, like this one, hopefully will make everyone's life a bit easier
:D.