GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Nullish semantics missed `MetaProperty` · Issue #60439 · microsoft/TypeScript

Nullish semantics missed MetaProperty #60439

New issue
Copy link
New issue
Copy link
Closed
#60440
Closed
Nullish semantics missed MetaProperty#60439
#60440
Copy link
Assignees
RyanCavanaugh
Labels
BugA bug in TypeScriptFix AvailableA PR has been opened for this issue
Milestone
TypeScript 5.8.0

Description

@RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)
opened on Nov 6, 2024
Issue body actions

🔎 Search Terms

never nullish

🕗 Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

https://www.typescriptlang.org/play/?target=1&ts=5.6.3#code/MYGwhgzhAEAa0G8BQ1XWAewHYQC4CcBXYXDfACgEpEU06BLAM2nKwFMB3AOlzHwHM2uaAH4R0AMwAmasjry0uABb4MHaABUAngAc2AUXyqKAAwDC2PERJloASSy4QXAMpt+AWzaO2+aPjYAR0J6AJgAcnYOcJNKWgUAX3joJKSgA

💻 Code

class X {
    constructor() {
        const p = new.target ?? 32;
    }
}

🙁 Actual behavior

Incorrectly says

right operand of ?? is unreachable because the left operand is never nullish

🙂 Expected behavior

No error

Additional information about the issue

No response

Activity

  1. Ryan Cavanaugh (RyanCavanaugh)
    self-assigned this
    on Nov 6, 2024
  2. Ryan Cavanaugh (RyanCavanaugh)
    added
    BugA bug in TypeScript
    on Nov 6, 2024
  3. Ryan Cavanaugh (RyanCavanaugh)
    added this to the TypeScript 5.8.0 milestone on Nov 6, 2024
  4. Ryan Cavanaugh (RyanCavanaugh)
    added 2 commits that reference this issue on Nov 6, 2024

    MetaProperty is possibly nullish

    This issue will close once commit d2f36cf is merged into the 'main' branch.
    d2f36cf

    MetaProperty is possibly nullish

    This issue will close once commit 316f0ab is merged into the 'main' branch.
    316f0ab
  5. TypeScript Bot (typescript-bot)
    added
    Fix AvailableA PR has been opened for this issue
    on Nov 6, 2024
  6. Ryan Cavanaugh (RyanCavanaugh)
    closed this as completedin #60440on Nov 6, 2024
  7. microsoft
    locked as resolved and limited conversation to collaborators on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @RyanCavanaugh
    Ryan Cavanaugh (RyanCavanaugh)

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

    Milestone

    • TypeScript 5.8.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.