explaingit

gvergnaud/hotscript

Analysis updated 2026-07-03

3,671TypeScriptAudience · developerComplexity · 3/5Setup · easy

TLDR

A TypeScript library that lets you transform and manipulate types using readable functional patterns like Pipe, map, and filter instead of deeply nested, hard-to-follow type expressions.

Mindmap

mindmap
  root((repo))
    What It Does
      Type-level transforms
      Readable type code
    Core Features
      Pipe operator
      Type lambdas
      Higher-order types
    Works With
      Tuples and arrays
      Objects and strings
      Numbers and booleans
    Use Cases
      URL route parsing
      querySelector types
      Less type boilerplate
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Replace deeply nested TypeScript type expressions with a readable Pipe chain of named transformation steps.

USE CASE 2

Parse a URL route pattern like /users/id:string into a TypeScript object type with correct field names and types automatically.

USE CASE 3

Write reusable type-level functions (lambdas) you can pass as arguments to map or filter at the type level.

USE CASE 4

Make querySelector calls fully type-safe based on the CSS selector string you pass in, without manual type assertions.

What is it built with?

TypeScript

How does it compare?

gvergnaud/hotscriptbtroncone/learn-rxjsmozilla/shumway
Stars3,6713,6733,669
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyeasyhard
Complexity3/52/55/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

API may change between releases as the project is marked a work in progress.

License not mentioned in the explanation.

In plain English

HOTScript is a TypeScript library that lets you write complex transformations at the type level using the same functional programming patterns you would use when writing regular runtime code. In TypeScript, types describe the shape of data (what fields an object has, what kind of values a function accepts), but manipulating those types in sophisticated ways normally requires verbose, hard-to-read syntax. HOTScript introduces a set of composable, named functions for types so the logic reads more like normal code. The core idea is a Pipe operator that passes a type through a chain of transformations, one step at a time. For example, you can start with a list of numbers, add a value to each one, join them into a string, split them again, and sum the results, all expressed as a sequence of named steps rather than deeply nested type expressions. This makes the intent of the type logic much easier to follow. The library includes functions for working with tuples (typed arrays), objects, strings, numbers, and booleans. There are functions for mapping, filtering, flattening, grouping, sorting, and doing arithmetic. You can also define your own reusable type-level functions, which the library calls lambdas, and pass them as arguments to higher-order functions like map and filter, the same way you would in JavaScript. A practical use case shown in the README is parsing a URL route pattern like /users/id:string/posts/index:number directly into a TypeScript object type with the correct field names and types. Another example shows making the browser's querySelector function fully type-safe based on the CSS selector string you pass in. This is a developer tool for TypeScript authors who want to write advanced type utilities with less boilerplate. It is published on npm and is a work in progress, so the API may change between releases.

Copy-paste prompts

Prompt 1
Using HOTScript, show me how to use Pipe to transform a tuple of numbers by adding 1 to each, converting them to strings, and joining them.
Prompt 2
Help me write a HOTScript type-level function that parses a URL route pattern like /users/id:string into a TypeScript object type with the right field types.
Prompt 3
I have a list of TypeScript object types and I want to filter out ones where a specific field is null using HOTScript. How do I do that?
Prompt 4
Show me how to define a custom HOTScript lambda and pass it as an argument to HOTScript map to transform a tuple of types.

Frequently asked questions

What is hotscript?

A TypeScript library that lets you transform and manipulate types using readable functional patterns like Pipe, map, and filter instead of deeply nested, hard-to-follow type expressions.

What language is hotscript written in?

Mainly TypeScript. The stack also includes TypeScript.

What license does hotscript use?

License not mentioned in the explanation.

How hard is hotscript to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is hotscript for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub gvergnaud on gitmyhub

Verify against the repo before relying on details.