microsoft / microsoft/TypeScript

Design Meeting Notes, 2026-06-23

Open
#63,674 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Design Notes
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

# `isolatedDeclarations` and Control Flow Analysis

https://github.com/microsoft/typescript-go/pull/4367

* Want to be able to infer types for trivial expressions in `isolatedDeclarations` in a function block.
* Specifically in discussion is if there are no return statements.
* But what happpens when you have a `never`-returning call? That can cause a `never`.
* Feels like anything with multiple statements in the body is questionable.
* We *could* make a special-case for `() => {}`.
* Probably enough to just say "just write `void`".
* Feels bad to say we can't come up with a type for `() => {}`
* Why? Feels like it's not a big deal?
* Well it's even more trivial than a single expression being returned.
* Sure, but the reason we added trivial expression inference was because people often have bigger structures of objects that are nested. So the triviality was not really about writing small expressions.
* One reason why we didn't do it (we think) is that we don't want to close the door to ourselves on how `void` vs. `undefined` is inferred for no-return-expression functions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the issue discussion and the linked pull request, microsoft/typescript-go#4367. Clarify the intended isolatedDeclarations behavior for function bodies with no return statements, including never-returning calls and the void-versus-undefined distinction. Done means the project has an agreed behavior and corresponding implementation scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.