You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
type reference and value reference to Worker refer to the class defined in mod1.js.
Actual behavior:
type reference Worker refers to the one in lib.dom.d.ts.
Two variants:
If you convert mod1.js to typescript with the equivalent export { Worker }, the error goes away.
If you use the syntax module.exports.Worker = class Worker extends EventEmitter, the error goes away, but goto-def on the value Worker throws an assertion:
Error: Debug Failure. Expected declaration to have at least one class-like declaration
at getConstructSignatureDefinition (/home/nathansa/ts/built/local/tsserver.js:107575:89)
at getDefinitionFromSymbol (/home/nathansa/ts/built/local/tsserver.js:107570:20)
at Object.getDefinitionAtPosition (/home/nathansa/ts/built/local/tsserver.js:107439:20)
at Object.getDefinitionAtPosition (/home/nathansa/ts/built/local/tsserver.js:125773:38)
The text was updated successfully, but these errors were encountered:
@weswigham I'm assigning to you because I'm pretty sure this is a result of #32947. If it's actually a result of contructor-functions-as-classes, re-assign to me.
TypeScript Version: 3.4.0-dev.201xxxxx
Search Terms:
Code
Run this:
Have a tsconfig like this:
In mod1.js:
In welove.ts:
Expected behavior:
type reference and value reference to
Worker
refer to the class defined inmod1.js
.Actual behavior:
type reference
Worker
refers to the one in lib.dom.d.ts.Two variants:
export { Worker }
, the error goes away.module.exports.Worker = class Worker extends EventEmitter
, the error goes away, but goto-def on the value Worker throws an assertion:The text was updated successfully, but these errors were encountered: