Skip to content

ronami/HypeScript

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
July 27, 2022 21:34
July 27, 2022 23:45
src
July 27, 2022 21:34
July 27, 2022 21:34
wip
July 27, 2022 21:34
wip
July 27, 2022 21:34
July 28, 2022 00:47
July 27, 2022 22:13
July 27, 2022 21:34

🐬 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:

  • Variables
  • Functions
  • Arrays
  • Objects
  • Methods
  • Function return type
  • Equality
  • Arithmetic operations
  • Globally types

Inspiration

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published