npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

raj-ts

v0.0.2

Published

Raj written in Typescript

Downloads

3

Readme

Raj.ts

The web framework Raj written in Typescript.

npm install raj-ts

Raj was written in 2018 when Typescript and Flow were in competition. It wasn't the right time to hitch to any type system on top of JavaScript. The author of Raj wasn't writing any Typescript at the time.

Now in 2022, TypeScript has come to dominate the typed JavaScript space. The author of Raj is now writing Typescript over JavaScript well enough to feel comfortable putting out Typescript definitions of the framework for others. This should make Raj and its design more approachable to newcomers accustom to type definitions.

Why not a Raj 2.0?

The existing Raj repository has remained unchanged since the 1.0 release in 2018. There's nothing wrong with that version so it won't be repurposed.

Adding types to any project is a breaking change, even for something as compact as Raj. Additionally Typescript itself has breaking changes regularly. Hitching to a type system that itself has breaking changes ought to invite only packages willing to be broken along the way.

Typescript is an incredible way to document and enforce code be used in the way the author intended. Raj.ts is the proper package to make the most out of it.

Why one package instead of a few packages?

Raj.ts re-packages the standard library of Raj packages in a single package:

  • raj => raj-ts/runtime
  • raj-compose => raj-ts/runtime
  • raj-subscription => raj-ts/subscription
  • raj-spa => raj-ts/route

The original decision to divide these small modules as full packages was influenced by:

  • Wanting to move at different paces with regard to versioning
  • Transpilation and tree-shaking not being widely adopted
  • Generally not knowing what a "standard library" would evolve to be

Since raj-ts is a more modern take on Raj, we can be more lax and lean on tooling assumptions Raj could not. For example, the very fact this is a Typescript version means the projects using it have access to transpilation. After years of using Raj in production, the standard library has become clear enough to curate.

What are the major behavioral differences between Raj and Raj.ts?

Nothing is fundamentally different between the versions. Type annotations provide constraints and a common vocabulary for talking about things like Program and Effect which previously had to be grokked from documentation and variable names.

Besides a few minor renames, the documentation for Raj is applicable to Raj.ts.