Skip to content

#29335 causes regression in property name lookup #29428

Closed
@sandersn

Description

@sandersn

#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.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions