This project is a Brainfuck interpreter written using TypeScript's type system. Take a look at this github thread for discussion on what the type system is capable of.
To learn more about bf, see:
Clone & yarn:
$> git clone https://github.com/neilbostian/bf-in-ts
$> yarn
Run tests - see tests:
$> yarn test
yarn
postinstall script runs a patch against typescript tsc.js
and tsserver.js
that updates the max instantiationCount
and instantiationDepth
. Using the default, tsc will error on large inputs:
error TS2589: Type instantiation is excessively deep and possibly infinite.
VsCode also shows this error - you might need to explicitly set the typescript version to the workspace tsserver defined in .vscode/settings.json. See this comment for more details.
- Shoutout to Carter who had a similar idea 👉 sno/bf
- This repo has loads of cool typescript 👉 fightingcat/sits