ronami/HypeScript

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

TypeScript

1,968

407 commits

updated Feb 7, 2025

See the code

README

🐬 HypeScript

Introduction

This is a simplified implementation of TypeScript's type system that's written in TypeScript's type annotations. This means that it uses types only — with no runtime code whatsoever.

You pass TypeScript code as a string to the TypeCheck generic and get possible type errors back (See the live demo):

showcase-1

☝ Please note that this project is meant to be used for fun and learning purposes and not for practical use.

Try running the code

See a live demo in your browser on the TypeScript Playground.

Alternatively, install @ronami/hypescript in your project with yarn or npm (TypeScript 4.7 or later is required):

yarn add @ronami/hypescript

Code examples

Only a subset of TypeScript's syntax and features are available. Here's a list of examples (with browser demo links) for some code examples:

Truncated — view the full README on GitHub.

example
functional-programming
learning
parser
recursion
static-code-analysis
typescript
type-system

ronami/HypeScript

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

TypeScript

1,968

407 commits

updated Feb 7, 2025

See the code

README

🐬 HypeScript

Introduction

This is a simplified implementation of TypeScript's type system that's written in TypeScript's type annotations. This means that it uses types only — with no runtime code whatsoever.

You pass TypeScript code as a string to the TypeCheck generic and get possible type errors back (See the live demo):

showcase-1

☝ Please note that this project is meant to be used for fun and learning purposes and not for practical use.

Try running the code

See a live demo in your browser on the TypeScript Playground.

Alternatively, install @ronami/hypescript in your project with yarn or npm (TypeScript 4.7 or later is required):

yarn add @ronami/hypescript

Code examples

Only a subset of TypeScript's syntax and features are available. Here's a list of examples (with browser demo links) for some code examples:

Truncated — view the full README on GitHub.

example
functional-programming
learning
parser
recursion
static-code-analysis
typescript
type-system

Significant stargazers

(top 24 of 63)

Pig Fang

514 followers · starred Jul 2022

Anton Medvedev

3,232 followers · starred Jul 2022

Bartosz Kaszubowski

469 followers · starred Jul 2022

Dotan Simha

1,920 followers · starred Aug 2022