Type inference of local variable based on later operations

This page summarizes the projects mentioned and recommended in the original post on /r/ProgrammingLanguages

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. inko

    A language for building concurrent software with confidence

    Inko's type checker, start at TypeChecker.check and work your way down the call stack. TypeChecker.check_type_ref is where most of the work is done.

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. TypeScript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    TypeScript is actually an... interesting example because it depends on compiler settings. When noImplicitAny is ON, then the list is first inferred as implicit any[] (riddle me that!). It then gets narrowed (unified?) later to string[]. I have to imagine this is a special case in the compiler because it doesn't work on user-defined data types (see example link above). The TypeScript checker.ts code is a single 50k LOC file so I'm probably not going to be able to understand the implementation.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • What to learn in 2022

    22 projects | dev.to | 19 Apr 2022
  • An Ode to TypeScript Enums

    9 projects | news.ycombinator.com | 2 Mar 2025
  • Farm: Fast vite compatible build tool written in Rust

    9 projects | news.ycombinator.com | 21 Jun 2024
  • Rustify your JavaScript tooling

    9 projects | dev.to | 21 May 2024
  • React Compiler is now open source

    3 projects | news.ycombinator.com | 15 May 2024

Did you know that TypeScript is
the 1st most popular programming language
based on number of references?