-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get resolved module exports in symbol chain and not raw exports (#20661)
* Actually get module exports and not module exports sans export stars * style update * Trim test a bit
- Loading branch information
Showing
5 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
tests/baselines/reference/declarationEmitAliasExportStar.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//// [tests/cases/compiler/declarationEmitAliasExportStar.ts] //// | ||
|
||
//// [thingB.ts] | ||
export interface ThingB { } | ||
//// [things.ts] | ||
export * from "./thingB"; | ||
//// [index.ts] | ||
import * as things from "./things"; | ||
export const thing2 = (param: things.ThingB) => null; | ||
|
||
|
||
//// [thingB.js] | ||
"use strict"; | ||
exports.__esModule = true; | ||
//// [things.js] | ||
"use strict"; | ||
exports.__esModule = true; | ||
//// [index.js] | ||
"use strict"; | ||
exports.__esModule = true; | ||
exports.thing2 = function (param) { return null; }; | ||
|
||
|
||
//// [thingB.d.ts] | ||
export interface ThingB { | ||
} | ||
//// [things.d.ts] | ||
export * from "./thingB"; | ||
//// [index.d.ts] | ||
import * as things from "./things"; | ||
export declare const thing2: (param: things.ThingB) => any; |
16 changes: 16 additions & 0 deletions
16
tests/baselines/reference/declarationEmitAliasExportStar.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
=== tests/cases/compiler/thingB.ts === | ||
export interface ThingB { } | ||
>ThingB : Symbol(ThingB, Decl(thingB.ts, 0, 0)) | ||
|
||
=== tests/cases/compiler/things.ts === | ||
export * from "./thingB"; | ||
No type information for this code.=== tests/cases/compiler/index.ts === | ||
import * as things from "./things"; | ||
>things : Symbol(things, Decl(index.ts, 0, 6)) | ||
|
||
export const thing2 = (param: things.ThingB) => null; | ||
>thing2 : Symbol(thing2, Decl(index.ts, 1, 12)) | ||
>param : Symbol(param, Decl(index.ts, 1, 23)) | ||
>things : Symbol(things, Decl(index.ts, 0, 6)) | ||
>ThingB : Symbol(things.ThingB, Decl(thingB.ts, 0, 0)) | ||
|
18 changes: 18 additions & 0 deletions
18
tests/baselines/reference/declarationEmitAliasExportStar.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
=== tests/cases/compiler/thingB.ts === | ||
export interface ThingB { } | ||
>ThingB : ThingB | ||
|
||
=== tests/cases/compiler/things.ts === | ||
export * from "./thingB"; | ||
No type information for this code.=== tests/cases/compiler/index.ts === | ||
import * as things from "./things"; | ||
>things : typeof things | ||
|
||
export const thing2 = (param: things.ThingB) => null; | ||
>thing2 : (param: things.ThingB) => any | ||
>(param: things.ThingB) => null : (param: things.ThingB) => any | ||
>param : things.ThingB | ||
>things : any | ||
>ThingB : things.ThingB | ||
>null : null | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// @declaration: true | ||
// @filename: thingB.ts | ||
export interface ThingB { } | ||
// @filename: things.ts | ||
export * from "./thingB"; | ||
// @filename: index.ts | ||
import * as things from "./things"; | ||
export const thing2 = (param: things.ThingB) => null; |