Back to directory
ghoullier avatar
ghoullier / awesome-template-literal-types

awesome-template-literal-types

Curated list of awesome Template Literal Types examples

1,224

Stars

27

Forks

16

Watchers

License

Awesome

TypeScript Awesome Template Literal Types

Curated list of awesome Template Literal Types examples.

🤯 Pure Madness

typescript-types-only-wasm-runtime

Tweet

typescript-types-only-wasm-runtime repo

Video walkthrough

📚 Handbook

📰 Articles

📺 Videos

👀 Examples

🗂️ Use Cases

dot notation string type-safe

Playground 143

dot notation string type-safe Illustration

Tweet

document.querySelector

Playground 143

querySelector Illustration

Tweet

Router params parsing

Playground 143

Extract Route Params Illustration

Tweet

static-path library

Tweet

static-path repo

Video walkthrough

Expression parser

Playground 143

Expression Parser Illustration

Tweet

JSON Parser

GitHub jamiebuilds 2Fjson parser in typescript very bad idea please dont use blue

Tweet

JSON Serializer

Tweet

Gist

GraphQL Typed AST

GitHub dotansimha 2Fgraphql typed ast blue

Tweet

SQL Database

GitHub codemix 2Fts sql blue Playground 143

SQL Database Illustration

Tweet

CSS Parser

Playground 143

CSS Parser Illustration

Tweet

ELIZA Bot

Playground 143

Eliza Bot Illustration

Tweet

Typescript Type System Adventure - by Rick Love

GitHub ricklove 2Frick love master blue

Typescript Type System Adventure

Blog

Tweet

Printf/Log

Playground 143

Similar to Idris' type-safe dependently-typed printf, but in TypeScript, working with console.log.

GitHub

Bitwise Arithmetic

Playground 143

Bitwise Arithmetic

GitHub

tRPC

GitHub trpc 2Ftrpc blue

TypeScript toolkit for building end-to-end type-safe APIs

The client above is not importing any code from the server, only it's type declarations.

tRPC Demo

Split

Playground 143

Split a string value with a given sepatator

Split

Tweet

Privatized

Playground 143

Automaticly privatize methods prefixed by '_'

Privatized

Tweet

Join

Playground 143

Type safe ReadonlyArray<string>.join

String Array Join

Tweet

Extract all paths from object

Playground 143

Extract all paths from object

Tweet

Repeat

Playground 143

repeat uuid v4

Tweet

schummar-translate

GitHub schummar 2Fschummar translate blue

Extract typed ICU params from translation strings

123524539 45a3cd00 d6cb 11eb 9f02 6884b405dc75

kysely

GitHub kysely org 2Fkysely blue

A type-safe typescript SQL query builder

demo

WebSite

chicane

GitHub swan io 2Fchicane blue

A simple and safe router for React and TypeScript, based on template literal types capabilities.

Prefix Properties

Playground 143

Prefix all keys of a Record

Tweet

Typelevel Parser

GitHub anuraghazra 2Ftypelevel parser blue Playground 143

TypeLevel DSL Parser

Type-Trident

GitHub anuraghazra 2Ftype trident blue

A curated list of advanced type level madness

HypeScript

GitHub ronami 2FHypeScript blue

A simplified implementation of TypeScript's type system written in TypeScript's own type system

HypeScript implemenation example

Tweet

Anysort

GitHub Lionad Morotar 2FAnysort blue Playground 143

Anysort,Flexible and Full Typed multi-properties sorter for nested objects

Anysort implemenation example

Wordle

Playground 143

A pure type only implementation of Wordle game

A pure type only implementation of Wordle game

pretty-cache-header

GitHub jjenzz 2Fpretty cache header blue Playground 143

Cache-control header utility that parses human readable time strings into seconds. Time based values use Template Literal Types to help avoid passing invalid time string formats.

nanostores-router

GitHub nanostores 2Frouter blue Playground 143

A tiny URL router for Nano Stores state manager.

A tiny URL router for Nano Stores state manager.

dot-path-value

GitHub g makarov 2Fdot path value blue Playground 143

Safely get deep nested properties using dot notation.

Safely get deep nested properties using dot notation.

GitHub

infer-html-events

Playground 143

Infer event names out of HTML elements

Infer event names out of HTML elements.

Tweet

hotscript

GitHub gvergnaud 2Fhotscript blue Playground 143

Higher-Order TypeScript: A lodash-like library for types, with support for type-level lambda functions.

https://user-images.githubusercontent.com/2315749/222081717-96217cd2-ac89-4e06-a942-17fbda717cd2.mp4

Tweet

brouther

GitHub g4rcez 2Fbrouther blue Playground 143

The brother router to help in React apps

Brouther router code example

hkt-toolbelt

GitHub poteat 2Fhkt toolbelt blue Playground 143

✨ Functional and composable type utilities

hkt-toolbelt code example

string-ts

GitHub poteat 2Fstring ts blue Playground 143

Strongly-typed string functions for all!

string-ts and zod example

typeskell

GitHub ecyrbe 2Ftypeskell blue

Experiment to declare typesclasses with programmatic type signatures.

typeskell example

gql.tada

GitHub 0no co 2Fgql tada blue

🪄 Magical GraphQL query engine for TypeScript

gql.tada example