Skip to content

#29335 causes regression in property name lookup #29428

Closed

Description

#29335 adds a oops-wrong-path redirect to getTypeofVariableOrParameterOrProperty that switches to getTypeOfFuncClassEnumModule. This new redirect breaks property resolution in chrome-devtools-frontend:

node_modules/chrome-devtools-frontend/front_end/ui/ContextMenu.js(355,22): error TS2339: Property '_useSoftMenu' does not exist on type 'typeof ContextMenu'.

Here's the associated code:

static initialize() {
    InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Events.SetUseSoftMenu, setUseSoftMenu);
    /**
     * @param {!Common.Event} event
     */
    function setUseSoftMenu(event) {
      UI.ContextMenu._useSoftMenu = /** @type {boolean} */ (event.data); // this line
    }
  }```

I think this is because there are *some* symbols that have ValueModule set, but should still be resolved with getTypeofVariableOrParameterOrProperty. It's a matter of separating those from the ones that #29335 cares about.

Activity

  1. weswigham commented on Jan 17, 2019

    @weswigham
    Member

    Per my commment in the user suite test - the new error is correct. The property access was allowed before because UI.ContextMenu acquired an any type from circular referencing, however now it (correctly) resolves to the namespace side of the type instead and the assignment fails (there is no top level assignment for that property, so it should never have worked).

  2. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions