```js var UI = {} UI.Hunch = class { constructor() { } } UI.Hunch.Provider = function() {}; UI.Hunch.Provider.prototype = { /** * @return {void} */ item() {} }; /** * @returns {UI.Hunch} */ function failure() { return new UI.Hunch(); } ``` **Expected behavior:** The value `new UI.Hunch()` is assignable to the return type reference `UI.Hunch`. **Actual behavior:** Error: Hunch is not assignable to `{ item: () => void } & { item: () => void }` Looks like `Provider`s prototype assignment confuses the type reference to UI.Hunch. Discovered in chrome-devtools-frontend, but it's been this way for a long time. Not a recent regression.