Catch array shape mismatches like a bad matrix multiply as a compile-time error instead of a runtime crash.
Build numeric or tensor-style code in TypeScript with NumPy-like array operations.
Get instant hover and error feedback in any TypeScript-aware editor with no extra plugin.
Run numeric array code safely in the browser using the pure JavaScript backend.
| crankfunk/numtype | 0xkinno/neuralvault | 0xmayurrr/ai-contractauditor | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | hard | easy |
| Complexity | 3/5 | 4/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Zero runtime dependencies, requires a fairly current TypeScript compiler for the type-level features.
numtype brings the idea behind NumPy, the popular Python library for working with grids of numbers, into TypeScript. The twist is that it checks the shapes of those grids while you are still typing your code, not after you run it. If you try to multiply two arrays whose shapes do not fit together, your editor shows an error right away instead of letting the mistake reach production. Many JavaScript and TypeScript projects that deal with numeric arrays have had to work around a missing piece: there was no shared, typed foundation for n-dimensional arrays the way NumPy is for Python. Related tools exist, but none of them put the type system itself to work checking array shapes. numtype focuses specifically on that gap, offering a smaller set of operations than a full NumPy clone would, done carefully rather than broadly. The technical trick is clever: TypeScript's type checker was never designed to do arithmetic on large numbers efficiently, so numtype represents numbers as strings of digits and does the math digit by digit, similar to how a person does subtraction by hand. This lets it compute things like array slice lengths and catch out of bounds errors directly in the type system, without needing huge amounts of computation that would normally overwhelm the checker. Under the hood, the actual number crunching is handled by a numeric backend written from scratch in Rust and compiled to WebAssembly, though this is optional. By default it runs on a pure JavaScript backend with zero runtime dependencies, so it works safely in a browser without any extra installation. The type-checking part works immediately in any modern code editor that understands TypeScript, with no special plugin needed. This project is aimed at TypeScript developers who work with numeric or array-heavy code and want mistakes caught early, before the program ever runs. It is licensed under Apache-2.0, which is a permissive open license. The project describes itself as an early v0.2 research preview, so some rough edges are expected. The full README is longer than what was shown.
A TypeScript library for numeric arrays that catches shape mismatches as editor errors while you type, instead of at runtime.
Mainly TypeScript. The stack also includes TypeScript, Rust, WebAssembly.
Use freely for any purpose, including commercial use, as long as you keep the copyright and license notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.