4 ms·
Show HN: TypeNix – full typing for Nix language by mapping to the TS AST
- mehackernewsacc 6mo agoWhoa. This is very, very cool. I love TypeScript and its type system, and started using Nix in the past few years and wished it could have something similar.
- ryanrasti 6mo agoI'm the author, you may find interesting: 1. Instead of building a new checker, TypeNix maps Nix's AST directly to TypeScript's AST. The standard TS binder, type checker and LSP work almost unchanged – they never know they’re looking at Nix 2. TypeNix on all 42K nixpkgs files in 13 seconds locally. Fixed-point patterns (makeExtensible, finalAttrs) typed via class transform with `this` binding.