Skip to content

Commit ca8a15d

Browse files
authored
Merge pull request #41287 from weswigham/bind-exports-assigned-object-as-alias
Bind `module.export = {Thing}` with alias symbols
2 parents bd27bd8 + e96ce39 commit ca8a15d

File tree

39 files changed

+464
-146
lines changed

39 files changed

+464
-146
lines changed

src/compiler/binder.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,6 +2834,11 @@ namespace ts {
28342834
return;
28352835
}
28362836

2837+
if (isObjectLiteralExpression(assignedExpression) && every(assignedExpression.properties, isShorthandPropertyAssignment)) {
2838+
forEach(assignedExpression.properties, bindExportAssignedObjectMemberAlias);
2839+
return;
2840+
}
2841+
28372842
// 'module.exports = expr' assignment
28382843
const flags = exportAssignmentIsAlias(node)
28392844
? SymbolFlags.Alias // An export= with an EntityNameExpression or a ClassExpression exports all meanings of that identifier or class
@@ -2842,6 +2847,10 @@ namespace ts {
28422847
setValueDeclaration(symbol, node);
28432848
}
28442849

2850+
function bindExportAssignedObjectMemberAlias(node: ShorthandPropertyAssignment) {
2851+
declareSymbol(file.symbol.exports!, file.symbol, node, SymbolFlags.Alias | SymbolFlags.Assignment, SymbolFlags.None);
2852+
}
2853+
28452854
function bindThisPropertyAssignment(node: BindablePropertyAssignmentExpression | PropertyAccessExpression | LiteralLikeElementAccessExpression) {
28462855
Debug.assert(isInJSFile(node));
28472856
// private identifiers *must* be declared (even in JS files)

src/compiler/checker.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6807,21 +6807,17 @@ namespace ts {
68076807
), ModifierFlags.None);
68086808
break;
68096809
}
6810-
// At present, the below case should be entirely unhit, as, generally speaking, the below case is *usually* bound
6811-
// such that the `BinaryExpression` is the declaration rather than the specific, nested binding element
6812-
// (because we don't seek to emit an alias in these forms yet). As such, the `BinaryExpression` switch case
6813-
// will be what actually handles this form. _However_, in anticipation of binding the below with proper
6814-
// alias symbols, I'm _pretty comfortable_ including the case here, even though it is not yet live.
6810+
// We don't know how to serialize this (nested?) binding element
6811+
Debug.failBadSyntaxKind(node.parent?.parent || node, "Unhandled binding element grandparent kind in declaration serialization");
6812+
break;
6813+
case SyntaxKind.ShorthandPropertyAssignment:
68156814
if (node.parent?.parent?.kind === SyntaxKind.BinaryExpression) {
68166815
// module.exports = { SomeClass }
68176816
serializeExportSpecifier(
68186817
unescapeLeadingUnderscores(symbol.escapedName),
68196818
targetName
68206819
);
6821-
break;
68226820
}
6823-
// We don't know how to serialize this (nested?) binding element
6824-
Debug.failBadSyntaxKind(node.parent?.parent || node, "Unhandled binding element grandparent kind in declaration serialization");
68256821
break;
68266822
case SyntaxKind.VariableDeclaration:
68276823
// commonjs require: const x = require('y')

tests/baselines/reference/findAllRefsCommonJsRequire3.baseline.jsonc

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"containerName": "",
1414
"fileName": "/b.js",
1515
"kind": "alias",
16-
"name": "(alias) (property) f: () => void\nimport f",
16+
"name": "(alias) function f(): void\nimport f",
1717
"textSpan": {
1818
"start": 8,
1919
"length": 1
@@ -36,16 +36,8 @@
3636
"kind": "space"
3737
},
3838
{
39-
"text": "(",
40-
"kind": "punctuation"
41-
},
42-
{
43-
"text": "property",
44-
"kind": "text"
45-
},
46-
{
47-
"text": ")",
48-
"kind": "punctuation"
39+
"text": "function",
40+
"kind": "keyword"
4941
},
5042
{
5143
"text": " ",
@@ -55,14 +47,6 @@
5547
"text": "f",
5648
"kind": "aliasName"
5749
},
58-
{
59-
"text": ":",
60-
"kind": "punctuation"
61-
},
62-
{
63-
"text": " ",
64-
"kind": "space"
65-
},
6650
{
6751
"text": "(",
6852
"kind": "punctuation"
@@ -72,11 +56,7 @@
7256
"kind": "punctuation"
7357
},
7458
{
75-
"text": " ",
76-
"kind": "space"
77-
},
78-
{
79-
"text": "=>",
59+
"text": ":",
8060
"kind": "punctuation"
8161
},
8262
{

tests/baselines/reference/jsDeclarationsCommonjsRelativePath.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ module.exports = { Thing }
1717
export class Thing {
1818
}
1919
//// [reexport.d.ts]
20+
export { Thing };
2021
import Thing_1 = require("./thing");
2122
import Thing = Thing_1.Thing;
22-
export { Thing };

tests/baselines/reference/jsDeclarationsCommonjsRelativePath.symbols

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const Thing = require('./thing').Thing
99

1010
module.exports = { Thing }
1111
>module.exports : Symbol("tests/cases/conformance/jsdoc/declarations/reexport", Decl(reexport.js, 0, 0))
12-
>module : Symbol(export=, Decl(reexport.js, 1, 38))
13-
>exports : Symbol(export=, Decl(reexport.js, 1, 38))
12+
>module : Symbol(module, Decl(reexport.js, 1, 38))
13+
>exports : Symbol("tests/cases/conformance/jsdoc/declarations/reexport", Decl(reexport.js, 0, 0))
1414
>Thing : Symbol(Thing, Decl(reexport.js, 2, 18))
1515

1616
=== tests/cases/conformance/jsdoc/declarations/thing.js ===
@@ -20,7 +20,7 @@ class Thing {}
2020

2121
module.exports = { Thing }
2222
>module.exports : Symbol("tests/cases/conformance/jsdoc/declarations/thing", Decl(thing.js, 0, 0))
23-
>module : Symbol(export=, Decl(thing.js, 1, 14))
24-
>exports : Symbol(export=, Decl(thing.js, 1, 14))
23+
>module : Symbol(module, Decl(thing.js, 1, 14))
24+
>exports : Symbol("tests/cases/conformance/jsdoc/declarations/thing", Decl(thing.js, 0, 0))
2525
>Thing : Symbol(Thing, Decl(thing.js, 2, 18))
2626

tests/baselines/reference/jsDeclarationsCommonjsRelativePath.types

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
const Thing = require('./thing').Thing
66
>Thing : typeof Thing
77
>require('./thing').Thing : typeof Thing
8-
>require('./thing') : { Thing: typeof Thing; }
8+
>require('./thing') : typeof import("tests/cases/conformance/jsdoc/declarations/thing")
99
>require : any
1010
>'./thing' : "./thing"
1111
>Thing : typeof Thing
1212

1313
module.exports = { Thing }
14-
>module.exports = { Thing } : { Thing: typeof Thing; }
15-
>module.exports : { Thing: typeof Thing; }
16-
>module : { "\"tests/cases/conformance/jsdoc/declarations/reexport\"": { Thing: typeof Thing; }; }
17-
>exports : { Thing: typeof Thing; }
14+
>module.exports = { Thing } : typeof import("tests/cases/conformance/jsdoc/declarations/reexport")
15+
>module.exports : typeof import("tests/cases/conformance/jsdoc/declarations/reexport")
16+
>module : { "\"tests/cases/conformance/jsdoc/declarations/reexport\"": typeof import("tests/cases/conformance/jsdoc/declarations/reexport"); }
17+
>exports : typeof import("tests/cases/conformance/jsdoc/declarations/reexport")
1818
>{ Thing } : { Thing: typeof Thing; }
1919
>Thing : typeof Thing
2020

@@ -26,10 +26,10 @@ class Thing {}
2626
>Thing : Thing
2727

2828
module.exports = { Thing }
29-
>module.exports = { Thing } : { Thing: typeof Thing; }
30-
>module.exports : { Thing: typeof Thing; }
31-
>module : { "\"tests/cases/conformance/jsdoc/declarations/thing\"": { Thing: typeof Thing; }; }
32-
>exports : { Thing: typeof Thing; }
29+
>module.exports = { Thing } : typeof import("tests/cases/conformance/jsdoc/declarations/thing")
30+
>module.exports : typeof import("tests/cases/conformance/jsdoc/declarations/thing")
31+
>module : { "\"tests/cases/conformance/jsdoc/declarations/thing\"": typeof import("tests/cases/conformance/jsdoc/declarations/thing"); }
32+
>exports : typeof import("tests/cases/conformance/jsdoc/declarations/thing")
3333
>{ Thing } : { Thing: typeof Thing; }
3434
>Thing : typeof Thing
3535

tests/baselines/reference/jsDeclarationsDocCommentsOnConsts.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ function b() {
2020

2121
module.exports = {x, b}
2222
>module.exports : Symbol("tests/cases/conformance/jsdoc/declarations/index1", Decl(index1.js, 0, 0))
23-
>module : Symbol(export=, Decl(index1.js, 12, 1))
24-
>exports : Symbol(export=, Decl(index1.js, 12, 1))
23+
>module : Symbol(module, Decl(index1.js, 12, 1))
24+
>exports : Symbol("tests/cases/conformance/jsdoc/declarations/index1", Decl(index1.js, 0, 0))
2525
>x : Symbol(x, Decl(index1.js, 14, 18))
2626
>b : Symbol(b, Decl(index1.js, 14, 20))
2727

tests/baselines/reference/jsDeclarationsDocCommentsOnConsts.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ function b() {
2323
}
2424

2525
module.exports = {x, b}
26-
>module.exports = {x, b} : { x: (a: any) => string; b: () => number; }
27-
>module.exports : { x: (a: any) => string; b: () => number; }
28-
>module : { "\"tests/cases/conformance/jsdoc/declarations/index1\"": { x: (a: any) => string; b: () => number; }; }
29-
>exports : { x: (a: any) => string; b: () => number; }
26+
>module.exports = {x, b} : typeof import("tests/cases/conformance/jsdoc/declarations/index1")
27+
>module.exports : typeof import("tests/cases/conformance/jsdoc/declarations/index1")
28+
>module : { "\"tests/cases/conformance/jsdoc/declarations/index1\"": typeof import("tests/cases/conformance/jsdoc/declarations/index1"); }
29+
>exports : typeof import("tests/cases/conformance/jsdoc/declarations/index1")
3030
>{x, b} : { x: (a: any) => string; b: () => number; }
3131
>x : (a: any) => string
3232
>b : () => number

tests/baselines/reference/jsDeclarationsExportForms.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ import * as ns from "./cls";
176176
export { ns as classContainer };
177177
import * as ns from "./cls";
178178
//// [cjs.d.ts]
179-
import ns = require("./cls");
180179
export { ns };
180+
import ns = require("./cls");
181181
//// [cjs2.d.ts]
182182
export = ns;
183183
import ns = require("./cls");

tests/baselines/reference/jsDeclarationsExportForms.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ const ns = require("./cls");
5050

5151
module.exports = { ns };
5252
>module.exports : Symbol("tests/cases/conformance/jsdoc/declarations/cjs", Decl(cjs.js, 0, 0))
53-
>module : Symbol(export=, Decl(cjs.js, 0, 28))
54-
>exports : Symbol(export=, Decl(cjs.js, 0, 28))
53+
>module : Symbol(module, Decl(cjs.js, 0, 28))
54+
>exports : Symbol("tests/cases/conformance/jsdoc/declarations/cjs", Decl(cjs.js, 0, 0))
5555
>ns : Symbol(ns, Decl(cjs.js, 1, 18))
5656

5757
=== tests/cases/conformance/jsdoc/declarations/cjs2.js ===

tests/baselines/reference/jsDeclarationsExportForms.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ const ns = require("./cls");
5050
>"./cls" : "./cls"
5151

5252
module.exports = { ns };
53-
>module.exports = { ns } : { ns: typeof ns; }
54-
>module.exports : { ns: typeof ns; }
55-
>module : { "\"tests/cases/conformance/jsdoc/declarations/cjs\"": { ns: typeof ns; }; }
56-
>exports : { ns: typeof ns; }
53+
>module.exports = { ns } : typeof import("tests/cases/conformance/jsdoc/declarations/cjs")
54+
>module.exports : typeof import("tests/cases/conformance/jsdoc/declarations/cjs")
55+
>module : { "\"tests/cases/conformance/jsdoc/declarations/cjs\"": typeof import("tests/cases/conformance/jsdoc/declarations/cjs"); }
56+
>exports : typeof import("tests/cases/conformance/jsdoc/declarations/cjs")
5757
>{ ns } : { ns: typeof ns; }
5858
>ns : typeof ns
5959

tests/baselines/reference/jsDeclarationsExportedClassAliases.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ export class FancyError extends Error {
5656
constructor(status: any);
5757
}
5858
//// [index.d.ts]
59-
import errors = require("./errors");
6059
export { errors };
60+
import errors = require("./errors");

tests/baselines/reference/jsDeclarationsExportedClassAliases.symbols

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
const errors = require("./errors");
44
>errors : Symbol(errors, Decl(index.js, 1, 5))
55
>require : Symbol(require)
6-
>"./errors" : Symbol("tests/cases/conformance/jsdoc/declarations/utils/errors", Decl(errors.js, 0, 0))
6+
>"./errors" : Symbol(errors, Decl(errors.js, 0, 0))
77

88
module.exports = {
99
>module.exports : Symbol("tests/cases/conformance/jsdoc/declarations/utils/index", Decl(index.js, 0, 0))
10-
>module : Symbol(export=, Decl(index.js, 1, 35))
11-
>exports : Symbol(export=, Decl(index.js, 1, 35))
10+
>module : Symbol(module, Decl(index.js, 1, 35))
11+
>exports : Symbol("tests/cases/conformance/jsdoc/declarations/utils/index", Decl(index.js, 0, 0))
1212

1313
errors
1414
>errors : Symbol(errors, Decl(index.js, 3, 18))
@@ -30,8 +30,8 @@ class FancyError extends Error {
3030

3131
module.exports = {
3232
>module.exports : Symbol("tests/cases/conformance/jsdoc/declarations/utils/errors", Decl(errors.js, 0, 0))
33-
>module : Symbol(export=, Decl(errors.js, 4, 1))
34-
>exports : Symbol(export=, Decl(errors.js, 4, 1))
33+
>module : Symbol(module, Decl(errors.js, 4, 1))
34+
>exports : Symbol("tests/cases/conformance/jsdoc/declarations/utils/errors", Decl(errors.js, 0, 0))
3535

3636
FancyError
3737
>FancyError : Symbol(FancyError, Decl(errors.js, 6, 18))

tests/baselines/reference/jsDeclarationsExportedClassAliases.types

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
=== tests/cases/conformance/jsdoc/declarations/utils/index.js ===
22
// issue arises here on compilation
33
const errors = require("./errors");
4-
>errors : { FancyError: typeof FancyError; }
5-
>require("./errors") : { FancyError: typeof FancyError; }
4+
>errors : typeof errors
5+
>require("./errors") : typeof errors
66
>require : any
77
>"./errors" : "./errors"
88

99
module.exports = {
10-
>module.exports = { errors} : { errors: { FancyError: typeof FancyError; }; }
11-
>module.exports : { errors: { FancyError: typeof FancyError; }; }
12-
>module : { "\"tests/cases/conformance/jsdoc/declarations/utils/index\"": { errors: { FancyError: typeof FancyError; }; }; }
13-
>exports : { errors: { FancyError: typeof FancyError; }; }
14-
>{ errors} : { errors: { FancyError: typeof FancyError; }; }
10+
>module.exports = { errors} : typeof import("tests/cases/conformance/jsdoc/declarations/utils/index")
11+
>module.exports : typeof import("tests/cases/conformance/jsdoc/declarations/utils/index")
12+
>module : { "\"tests/cases/conformance/jsdoc/declarations/utils/index\"": typeof import("tests/cases/conformance/jsdoc/declarations/utils/index"); }
13+
>exports : typeof import("tests/cases/conformance/jsdoc/declarations/utils/index")
14+
>{ errors} : { errors: typeof errors; }
1515

1616
errors
17-
>errors : { FancyError: typeof FancyError; }
17+
>errors : typeof errors
1818

1919
};
2020
=== tests/cases/conformance/jsdoc/declarations/utils/errors.js ===
@@ -34,10 +34,10 @@ class FancyError extends Error {
3434
}
3535

3636
module.exports = {
37-
>module.exports = { FancyError} : { FancyError: typeof FancyError; }
38-
>module.exports : { FancyError: typeof FancyError; }
39-
>module : { "\"tests/cases/conformance/jsdoc/declarations/utils/errors\"": { FancyError: typeof FancyError; }; }
40-
>exports : { FancyError: typeof FancyError; }
37+
>module.exports = { FancyError} : typeof import("tests/cases/conformance/jsdoc/declarations/utils/errors")
38+
>module.exports : typeof import("tests/cases/conformance/jsdoc/declarations/utils/errors")
39+
>module : { "\"tests/cases/conformance/jsdoc/declarations/utils/errors\"": typeof import("tests/cases/conformance/jsdoc/declarations/utils/errors"); }
40+
>exports : typeof import("tests/cases/conformance/jsdoc/declarations/utils/errors")
4141
>{ FancyError} : { FancyError: typeof FancyError; }
4242

4343
FancyError

tests/baselines/reference/jsDeclarationsImportAliasExposedWithinNamespaceCjs.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ function testFn(input) {
4040

4141
module.exports = {testFn, testFnTypes};
4242
>module.exports : Symbol("tests/cases/conformance/jsdoc/declarations/file2", Decl(file2.js, 0, 0))
43-
>module : Symbol(export=, Decl(file2.js, 25, 1))
44-
>exports : Symbol(export=, Decl(file2.js, 25, 1))
43+
>module : Symbol(module, Decl(file2.js, 25, 1))
44+
>exports : Symbol("tests/cases/conformance/jsdoc/declarations/file2", Decl(file2.js, 0, 0))
4545
>testFn : Symbol(testFn, Decl(file2.js, 27, 18))
4646
>testFnTypes : Symbol(testFnTypes, Decl(file2.js, 27, 25))
4747

tests/baselines/reference/jsDeclarationsImportAliasExposedWithinNamespaceCjs.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ function testFn(input) {
4747
}
4848

4949
module.exports = {testFn, testFnTypes};
50-
>module.exports = {testFn, testFnTypes} : { testFn: (input: testFnTypes.input) => number; testFnTypes: { [x: string]: any; }; }
51-
>module.exports : { testFn: (input: testFnTypes.input) => number; testFnTypes: { [x: string]: any; }; }
52-
>module : { "\"tests/cases/conformance/jsdoc/declarations/file2\"": { testFn: (input: testFnTypes.input) => number; testFnTypes: { [x: string]: any; }; }; }
53-
>exports : { testFn: (input: testFnTypes.input) => number; testFnTypes: { [x: string]: any; }; }
50+
>module.exports = {testFn, testFnTypes} : typeof import("tests/cases/conformance/jsdoc/declarations/file2")
51+
>module.exports : typeof import("tests/cases/conformance/jsdoc/declarations/file2")
52+
>module : { "\"tests/cases/conformance/jsdoc/declarations/file2\"": typeof import("tests/cases/conformance/jsdoc/declarations/file2"); }
53+
>exports : typeof import("tests/cases/conformance/jsdoc/declarations/file2")
5454
>{testFn, testFnTypes} : { testFn: (input: testFnTypes.input) => number; testFnTypes: { [x: string]: any; }; }
5555
>testFn : (input: testFnTypes.input) => number
5656
>testFnTypes : { [x: string]: any; }

tests/baselines/reference/jsDeclarationsReexportedCjsAlias.symbols

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const { SomeClass, SomeClass: Another } = require('./lib');
88

99
module.exports = {
1010
>module.exports : Symbol("tests/cases/conformance/jsdoc/declarations/main", Decl(main.js, 0, 0))
11-
>module : Symbol(export=, Decl(main.js, 0, 59))
12-
>exports : Symbol(export=, Decl(main.js, 0, 59))
11+
>module : Symbol(module, Decl(main.js, 0, 59))
12+
>exports : Symbol("tests/cases/conformance/jsdoc/declarations/main", Decl(main.js, 0, 0))
1313

1414
SomeClass,
1515
>SomeClass : Symbol(SomeClass, Decl(main.js, 2, 18))
@@ -42,8 +42,8 @@ class SomeClass {
4242

4343
module.exports = {
4444
>module.exports : Symbol("tests/cases/conformance/jsdoc/declarations/lib", Decl(lib.js, 0, 0))
45-
>module : Symbol(export=, Decl(lib.js, 11, 1))
46-
>exports : Symbol(export=, Decl(lib.js, 11, 1))
45+
>module : Symbol(module, Decl(lib.js, 11, 1))
46+
>exports : Symbol("tests/cases/conformance/jsdoc/declarations/lib", Decl(lib.js, 0, 0))
4747

4848
bar,
4949
>bar : Symbol(bar, Decl(lib.js, 13, 18))

tests/baselines/reference/jsDeclarationsReexportedCjsAlias.types

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ const { SomeClass, SomeClass: Another } = require('./lib');
33
>SomeClass : typeof SomeClass
44
>SomeClass : any
55
>Another : typeof SomeClass
6-
>require('./lib') : { bar: (a: string) => string; SomeClass: typeof SomeClass; }
6+
>require('./lib') : typeof import("tests/cases/conformance/jsdoc/declarations/lib")
77
>require : any
88
>'./lib' : "./lib"
99

1010
module.exports = {
11-
>module.exports = { SomeClass, Another} : { SomeClass: typeof SomeClass; Another: typeof SomeClass; }
12-
>module.exports : { SomeClass: typeof SomeClass; Another: typeof SomeClass; }
13-
>module : { "\"tests/cases/conformance/jsdoc/declarations/main\"": { SomeClass: typeof SomeClass; Another: typeof SomeClass; }; }
14-
>exports : { SomeClass: typeof SomeClass; Another: typeof SomeClass; }
11+
>module.exports = { SomeClass, Another} : typeof import("tests/cases/conformance/jsdoc/declarations/main")
12+
>module.exports : typeof import("tests/cases/conformance/jsdoc/declarations/main")
13+
>module : { "\"tests/cases/conformance/jsdoc/declarations/main\"": typeof import("tests/cases/conformance/jsdoc/declarations/main"); }
14+
>exports : typeof import("tests/cases/conformance/jsdoc/declarations/main")
1515
>{ SomeClass, Another} : { SomeClass: typeof SomeClass; Another: typeof SomeClass; }
1616

1717
SomeClass,
@@ -46,10 +46,10 @@ class SomeClass {
4646
}
4747

4848
module.exports = {
49-
>module.exports = { bar, SomeClass} : { bar: (a: string) => string; SomeClass: typeof SomeClass; }
50-
>module.exports : { bar: (a: string) => string; SomeClass: typeof SomeClass; }
51-
>module : { "\"tests/cases/conformance/jsdoc/declarations/lib\"": { bar: (a: string) => string; SomeClass: typeof SomeClass; }; }
52-
>exports : { bar: (a: string) => string; SomeClass: typeof SomeClass; }
49+
>module.exports = { bar, SomeClass} : typeof import("tests/cases/conformance/jsdoc/declarations/lib")
50+
>module.exports : typeof import("tests/cases/conformance/jsdoc/declarations/lib")
51+
>module : { "\"tests/cases/conformance/jsdoc/declarations/lib\"": typeof import("tests/cases/conformance/jsdoc/declarations/lib"); }
52+
>exports : typeof import("tests/cases/conformance/jsdoc/declarations/lib")
5353
>{ bar, SomeClass} : { bar: (a: string) => string; SomeClass: typeof SomeClass; }
5454

5555
bar,

0 commit comments

Comments
 (0)