-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallycheckJsRelates to checking JavaScript using TypeScriptRelates to checking JavaScript using TypeScript
Milestone
Description
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @strict: true
// @Filename: a.js
// from debug
var debug = module.exports = create.debug = create['default'] = create;
function create() {
function d() {
var curr = +new Date()
d.curr = curr
}
return d
}
function assert() {
}
debug.assert = assert
Expected behavior:
No errors, and the debug
module should have exports { debug, default, assert }
and also be callable.
Actual behavior:
Lots of different errors, and no exported members. Moving the function create
before the exports assignments adds the export debug
, but that's it.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallycheckJsRelates to checking JavaScript using TypeScriptRelates to checking JavaScript using TypeScript