Skip to content

Document control-flow requirements for never-returning calls - #63716

Closed
RyanCavanaugh with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-lambda-never-return-type-check
Closed

Document control-flow requirements for never-returning calls#63716
RyanCavanaugh with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-lambda-never-return-type-check

Conversation

Copilot AI commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Calls to explicitly never-returning methods do not affect control flow when an identifier in the call target has an inferred type.

  • Document the explicit-type requirements for assertion and never-returning calls.
  • Explain the circular control-flow analysis constraint.
  • Show the required receiver annotation:
const impl: FooImpl = new FooImpl();

const f = (): number => {
    impl.bar(new Error());
};

@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 4, 2026
Copilot AI changed the title [WIP] Fix Typescript checks for lambda calling never function Document control-flow requirements for never-returning calls Aug 4, 2026
Copilot AI requested a review from RyanCavanaugh August 4, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typescript still checks return type in a lamba that calls a function returning 'never'

2 participants