matrix-org / matrix-org/matrix-viewer
TypeScript support
Open
Nobody has claimed this yet.
dev-notes
T-Task
- Dominant language
- JavaScript
- Stars
- 84
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Expectations
- I'd like the type benefits of TypeScript without the complexity and hassle of TypeScript not natively running on Node.js. I don't want to think about the TypeScript transpilation whenever I start the server.
- Stack traces that make sense in dev and production out of the box (source maps).
- Node.js
v12.12.0added--enable-source-maps
- Node.js
- Ideally, the way to run it in production would be the same as dev besides watching for file changes.
What are the standard ways people accomplish this?
- Build before running the server
- I don't want a bunch of duplicate compiled
.jsfiles next to the.tssource. And I don't want to think about a build beforehand when developing. - Maybe for production, can build to a
build/directory if the recommendation is to always to use the compiled.jsversion.tsc && node build/server.js
- I don't want a bunch of duplicate compiled
- https://www.npmjs.com/package/ts-node
- https://javascript.plainenglish.io/typescript-with-node-and-express-js-why-when-and-how-eb6bc73edd5d
- Can it be efficient in production?
- "Compatible with pre-compilation for production"
- https://github.com/TypeStrong/ts-node/issues/104
- https://stackoverflow.com/questions/60581617/is-it-a-bad-practise-to-use-ts-node-in-production
- https://deno.land/
- Does all of the transpilation for us
- https://bun.sh/
- The new kid on the block
- Does all of the transpilation for us
- Lots of chatter about it being so fast and performant (faster than Deno, faster than Node.js)
- Getting support for
vm.Script.runInContext(...)soon (which we need to run the Matrix Public Archive)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the expectations and linked references for ts-node, Node.js source maps, Deno, and Bun, then inspect the repository's current server startup and JavaScript setup. Done means the project has a decided TypeScript runtime or build approach, sensible development and production workflows, and useful stack traces without requiring duplicate source files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, deno, node.js, typescript
- Domain
- backend, build-system, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100