-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤖 Pick PR #58810 (Fixed declaration emit issue relate...) into releas…
…e-5.5 (#58842) Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
- Loading branch information
Showing
5 changed files
with
170 additions
and
8 deletions.
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
43 changes: 43 additions & 0 deletions
43
tests/baselines/reference/declarationEmitTopLevelNodeFromCrossFile2.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,43 @@ | ||
//// [tests/cases/compiler/declarationEmitTopLevelNodeFromCrossFile2.ts] //// | ||
|
||
//// [a.ts] | ||
import { boxedBox } from "./boxedBox"; | ||
|
||
export const _ = boxedBox; | ||
|
||
// At index 83 | ||
/** | ||
* wat | ||
*/ | ||
|
||
//// [boxedBox.d.ts] | ||
export declare const boxedBox: import("./box").Box<{ | ||
boxed: import("./box").Box<number>; | ||
}>; // ^This is index 83 in this file | ||
|
||
//// [box.d.ts] | ||
export declare class Box<T> { | ||
value: T; | ||
constructor(value: T); | ||
} | ||
export declare function box<T>(value: T): Box<T>; | ||
|
||
//// [a.js] | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._ = void 0; | ||
var boxedBox_1 = require("./boxedBox"); | ||
exports._ = boxedBox_1.boxedBox; | ||
// At index 83 | ||
/** | ||
* wat | ||
*/ | ||
|
||
|
||
//// [a.d.ts] | ||
export declare const _: import("./box").Box<{ | ||
boxed: import("./box").Box<number>; | ||
}>; | ||
/** | ||
* wat | ||
*/ |
47 changes: 47 additions & 0 deletions
47
tests/baselines/reference/declarationEmitTopLevelNodeFromCrossFile2.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,47 @@ | ||
//// [tests/cases/compiler/declarationEmitTopLevelNodeFromCrossFile2.ts] //// | ||
|
||
=== a.ts === | ||
import { boxedBox } from "./boxedBox"; | ||
>boxedBox : Symbol(boxedBox, Decl(a.ts, 0, 8)) | ||
|
||
export const _ = boxedBox; | ||
>_ : Symbol(_, Decl(a.ts, 2, 12)) | ||
>boxedBox : Symbol(boxedBox, Decl(a.ts, 0, 8)) | ||
|
||
// At index 83 | ||
/** | ||
* wat | ||
*/ | ||
|
||
=== boxedBox.d.ts === | ||
export declare const boxedBox: import("./box").Box<{ | ||
>boxedBox : Symbol(boxedBox, Decl(boxedBox.d.ts, 0, 20)) | ||
>Box : Symbol(Box, Decl(box.d.ts, 0, 0)) | ||
|
||
boxed: import("./box").Box<number>; | ||
>boxed : Symbol(boxed, Decl(boxedBox.d.ts, 0, 52)) | ||
>Box : Symbol(Box, Decl(box.d.ts, 0, 0)) | ||
|
||
}>; // ^This is index 83 in this file | ||
|
||
=== box.d.ts === | ||
export declare class Box<T> { | ||
>Box : Symbol(Box, Decl(box.d.ts, 0, 0)) | ||
>T : Symbol(T, Decl(box.d.ts, 0, 25)) | ||
|
||
value: T; | ||
>value : Symbol(Box.value, Decl(box.d.ts, 0, 29)) | ||
>T : Symbol(T, Decl(box.d.ts, 0, 25)) | ||
|
||
constructor(value: T); | ||
>value : Symbol(value, Decl(box.d.ts, 2, 16)) | ||
>T : Symbol(T, Decl(box.d.ts, 0, 25)) | ||
} | ||
export declare function box<T>(value: T): Box<T>; | ||
>box : Symbol(box, Decl(box.d.ts, 3, 1)) | ||
>T : Symbol(T, Decl(box.d.ts, 4, 28)) | ||
>value : Symbol(value, Decl(box.d.ts, 4, 31)) | ||
>T : Symbol(T, Decl(box.d.ts, 4, 28)) | ||
>Box : Symbol(Box, Decl(box.d.ts, 0, 0)) | ||
>T : Symbol(T, Decl(box.d.ts, 4, 28)) | ||
|
48 changes: 48 additions & 0 deletions
48
tests/baselines/reference/declarationEmitTopLevelNodeFromCrossFile2.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,48 @@ | ||
//// [tests/cases/compiler/declarationEmitTopLevelNodeFromCrossFile2.ts] //// | ||
|
||
=== a.ts === | ||
import { boxedBox } from "./boxedBox"; | ||
>boxedBox : import("box").Box<{ boxed: import("box").Box<number>; }> | ||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ | ||
|
||
export const _ = boxedBox; | ||
>_ : import("box").Box<{ boxed: import("box").Box<number>; }> | ||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ | ||
>boxedBox : import("box").Box<{ boxed: import("box").Box<number>; }> | ||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ | ||
|
||
// At index 83 | ||
/** | ||
* wat | ||
*/ | ||
|
||
=== boxedBox.d.ts === | ||
export declare const boxedBox: import("./box").Box<{ | ||
>boxedBox : import("box").Box<{ boxed: import("./box").Box<number>; }> | ||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ | ||
|
||
boxed: import("./box").Box<number>; | ||
>boxed : import("box").Box<number> | ||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
}>; // ^This is index 83 in this file | ||
|
||
=== box.d.ts === | ||
export declare class Box<T> { | ||
>Box : Box<T> | ||
> : ^^^^^^ | ||
|
||
value: T; | ||
>value : T | ||
> : ^ | ||
|
||
constructor(value: T); | ||
>value : T | ||
> : ^ | ||
} | ||
export declare function box<T>(value: T): Box<T>; | ||
>box : <T>(value: T) => Box<T> | ||
> : ^ ^^ ^^ ^^^^^ | ||
>value : T | ||
> : ^ | ||
|
24 changes: 24 additions & 0 deletions
24
tests/cases/compiler/declarationEmitTopLevelNodeFromCrossFile2.ts
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,24 @@ | ||
// @strict: true | ||
// @declaration: true | ||
|
||
// @filename: a.ts | ||
import { boxedBox } from "./boxedBox"; | ||
|
||
export const _ = boxedBox; | ||
|
||
// At index 83 | ||
/** | ||
* wat | ||
*/ | ||
|
||
// @filename: boxedBox.d.ts | ||
export declare const boxedBox: import("./box").Box<{ | ||
boxed: import("./box").Box<number>; | ||
}>; // ^This is index 83 in this file | ||
|
||
// @filename: box.d.ts | ||
export declare class Box<T> { | ||
value: T; | ||
constructor(value: T); | ||
} | ||
export declare function box<T>(value: T): Box<T>; |