{"id":50713688,"url":"https://github.com/sinelaw/inty","last_synced_at":"2026-06-09T17:03:59.371Z","repository":{"id":330837078,"uuid":"1121973259","full_name":"sinelaw/inty","owner":"sinelaw","description":"Type checker for dynamic languages like JavaScript \u0026 Python, with full type inference and no transpilation","archived":false,"fork":false,"pushed_at":"2026-06-09T10:05:21.000Z","size":4117,"stargazers_count":9,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-09T10:06:18.265Z","etag":null,"topics":["javascript","typechecking","typeinference"],"latest_commit_sha":null,"homepage":"https://sinelaw.github.io/inty/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinelaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-23T22:05:28.000Z","updated_at":"2026-06-09T09:44:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sinelaw/inty","commit_stats":null,"previous_names":["sinelaw/minfern","sinelaw/inty"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sinelaw/inty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinelaw%2Finty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinelaw%2Finty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinelaw%2Finty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinelaw%2Finty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinelaw","download_url":"https://codeload.github.com/sinelaw/inty/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinelaw%2Finty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34116461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","typechecking","typeinference"],"created_at":"2026-06-09T17:03:58.632Z","updated_at":"2026-06-09T17:03:59.365Z","avatar_url":"https://github.com/sinelaw.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inty\n\nInty is a static type checker with full type inference. Source code you check\nwith inty is just plain source in its surface language — no transpilation, no\nadded syntax — and runs as-is in the corresponding runtime.\n\nInty's inference engine is language-agnostic: a frontend lowers its surface\nsyntax onto a shared AST, and the type checker works on that AST.\n\nFrontends:\n\n- **JavaScript** — the primary frontend. Vanilla JS, optional JSDoc-style annotations.\n- **Python** — a deliberately limited subset that lowers cleanly onto the type system.\n- **Lua** — early sketch; the frontend parses a small subset, but it's not shipped end-to-end (no playground, no LSP integration).\n\nThe type system was designed to cover the common ground of these languages,\nwhile deliberately leaving out parts that are \"too dynamic\", or considered\ngenerally harmful.\n\ninty is available as a CLI, an LSP server, and a WASM library.\n\nTry it online at: https://sinelaw.github.io/inty/\n\ninty is based on [infernu](https://github.com/sinelaw/infernu).\n\n## Usage\n\nBuild the CLI (which also ships the LSP server):\n\n```sh\ncargo build --release -p inty-cli\n# binary lands at target/release/inty\n```\n\nCheck a file:\n\n```sh\ninty path/to/file.js\ninty path/to/file.py\n```\n\nThe frontend is picked from the file extension. Run `inty --help` for the full\nset of options.\n\nThe LSP server is included as a CLI command (`inty lsp`). A minimal VS Code\nadapter lives in [`editors/vscode/`](editors/vscode/) — run\n[`editors/vscode/install.sh`](editors/vscode/install.sh) to build, package, and\ninstall it in one step.\n\n## How does it compare to TypeScript?\n\n|                    | TypeScript                           | **Inty**                                                |\n| ------------------ | ------------------------------------ | ------------------------------------------------------- |\n| **Build step**     | Transpiles to JavaScript             | A pure type checker — no transpilation, vanilla source  |\n| **Relation to source** | A superset (sometimes) of JavaScript | A subset of the source language, deliberately discarding the \"bad parts\" |\n| **Typing style**   | Gradual typing, requires annotations | Strictly full static typing, type inference, annotations are optional |\n\nThere is no `any` type in inty. `null`/`undefined` are explicit via union types.\n\n## Strict by Design\n\ninty isn't a strict mode you opt into — it's the only mode. Every variable,\nexpression, and function return has a single type for its lifetime. The type\nmay be polymorphic, or a closed union of literals or row shapes, but it can't\n*change* under assignment, and operators that combine values still require\ntheir operands' types to agree. The benefit is that type errors become\ncompile-time errors, with no runtime fallback.\n\n## Type system\n\nThe type system features — full inference, parametric and row polymorphism,\ntype classes, equi-recursive types for method chains, callable rows, union\ntypes and predicate refinement, class bodies with private fields, ES modules\n— along with the JavaScript syntax accepted, the rejected idioms, and the\nannotation grammar, are documented separately:\n\n- [docs/type-system.md](docs/type-system.md) — features, examples, accepted/rejected syntax, annotation grammar.\n- [modules.md](modules.md) — module resolution design (and `examples/modules/` for runnable fixtures).\n- [docs/jsdoc-at-type.md](docs/jsdoc-at-type.md) — `@type {T}` and `typeof` rules.\n\n## Future Work\n\nClass inheritance (`extends`, `super`) and `static` class members are\ndeliberately out of scope — see [examples/spa/gaps.md § \"By design\"](examples/spa/gaps.md).\nThe only structurally useful thing they unlock is library-specific\ninstance-shape derivation (Stimulus-style `static targets` ↦ `this.fooTarget`),\nwhich is closer to TypeScript's mapped types than to row polymorphism and is\nalso out of scope.\n\nOpen: making `\u0026\u0026` / `||` flow-narrowing-aware so default-value patterns like\n`name || \"Guest\"` work without forcing operands' types to match. The\nprincipal-typing property would need a careful rule.\n\n## Self-testing\n\ninty is heavily tested against itself: every operator's typing rule is\ncross-checked against an operational semantics, and a property test generates\nwell-typed programs by construction and reduces them to verify they never get\n\"stuck\". See [ARCHITECTURE.md](ARCHITECTURE.md) for the module layout and the\nfour test layers.\n\n## Background\n\ninty is based on the type system developed for\n[infernu](https://github.com/sinelaw/infernu). See [infernu.md](infernu.md) for\na partial formalization. The implementation also covers `this` resolution,\nRank-1 restrictions on type annotations, and a value restriction for\ngeneralisation and polymorphic-property mutation; the formal document doesn't\ngo into these.\n\nThe JavaScript inty checks is just JavaScript and runs in browsers, server\nruntimes, or even embedded engines. See\n[mquickjs](https://github.com/bellard/mquickjs), a runtime that also supports a\nsubset of JavaScript.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinelaw%2Finty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinelaw%2Finty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinelaw%2Finty/lists"}