Consider using TypeScript #24
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	
	No description provided.
		
		Delete branch "%!s()"
	 
	Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I like not having additional build steps. However, developing the rkgk frontend is quite a pain without access to type annotations, so I've been considering ways on how to add support for TypeScript in the project.
tscis kind of slow, which makes it a hard sell, as I prefer fast builds, but other TypeScript compilers are not as available from system package managers.tscinstead.)swcseems like a promising Rust-native alternative, but it has no easy introduction on how to integrate it into an existing Rust project. Therefore I'd need to do some serious research before integrating it into our pipeline.I timed tsc on rkgk and it looks just about bearable:
I might consider integrating it into the build later to see how I feel about it.
You probably don't want
swc, because it doesn't support type checking:I was looking for an alternative to
tscfor one of my projects a few years ago, and from my experience, if you want type checking from TypeScript then I think your best option is stilltsc. There are ways to "mix"swcandtsc, runningtscin the background, etc., but ymmv.Mixing
swcwithtscwas what I had in mind - the LSP still shows you errors as you type, plus we could runtscto catch them in CI. I just don't want it slowing down my iteration times.Merged from #104
JavaScript is cool and all, but porting the codebase to TypeScript would greatly increase its maintainability.
It wouldn't be a simple task though, requiring us to change some idioms we currently use:
async listenThere's also the question of how long will it last. Theoretically nothing should break if we only depend on Vite, but I haven't used NPM enough to know.