mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 07:29:16 -05:00
partially revert #7583
This commit is contained in:
20
tests/baselines/reference/mergeWithImportedNamespace.js
Normal file
20
tests/baselines/reference/mergeWithImportedNamespace.js
Normal file
@@ -0,0 +1,20 @@
|
||||
//// [tests/cases/compiler/mergeWithImportedNamespace.ts] ////
|
||||
|
||||
//// [f1.ts]
|
||||
export namespace N { export var x = 1; }
|
||||
|
||||
//// [f2.ts]
|
||||
import {N} from "./f1";
|
||||
// partial revert of https://github.com/Microsoft/TypeScript/pull/7583 to prevent breaking changes
|
||||
export namespace N {
|
||||
export interface I {x: any}
|
||||
}
|
||||
|
||||
//// [f1.js]
|
||||
"use strict";
|
||||
var N;
|
||||
(function (N) {
|
||||
N.x = 1;
|
||||
})(N = exports.N || (exports.N = {}));
|
||||
//// [f2.js]
|
||||
"use strict";
|
||||
17
tests/baselines/reference/mergeWithImportedNamespace.symbols
Normal file
17
tests/baselines/reference/mergeWithImportedNamespace.symbols
Normal file
@@ -0,0 +1,17 @@
|
||||
=== tests/cases/compiler/f1.ts ===
|
||||
export namespace N { export var x = 1; }
|
||||
>N : Symbol(N, Decl(f1.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(f1.ts, 0, 31))
|
||||
|
||||
=== tests/cases/compiler/f2.ts ===
|
||||
import {N} from "./f1";
|
||||
>N : Symbol(N, Decl(f2.ts, 0, 8), Decl(f2.ts, 0, 23))
|
||||
|
||||
// partial revert of https://github.com/Microsoft/TypeScript/pull/7583 to prevent breaking changes
|
||||
export namespace N {
|
||||
>N : Symbol(N, Decl(f2.ts, 0, 23))
|
||||
|
||||
export interface I {x: any}
|
||||
>I : Symbol(I, Decl(f2.ts, 2, 20))
|
||||
>x : Symbol(I.x, Decl(f2.ts, 3, 24))
|
||||
}
|
||||
18
tests/baselines/reference/mergeWithImportedNamespace.types
Normal file
18
tests/baselines/reference/mergeWithImportedNamespace.types
Normal file
@@ -0,0 +1,18 @@
|
||||
=== tests/cases/compiler/f1.ts ===
|
||||
export namespace N { export var x = 1; }
|
||||
>N : typeof N
|
||||
>x : number
|
||||
>1 : number
|
||||
|
||||
=== tests/cases/compiler/f2.ts ===
|
||||
import {N} from "./f1";
|
||||
>N : typeof N
|
||||
|
||||
// partial revert of https://github.com/Microsoft/TypeScript/pull/7583 to prevent breaking changes
|
||||
export namespace N {
|
||||
>N : any
|
||||
|
||||
export interface I {x: any}
|
||||
>I : I
|
||||
>x : any
|
||||
}
|
||||
18
tests/baselines/reference/mergeWithImportedType.js
Normal file
18
tests/baselines/reference/mergeWithImportedType.js
Normal file
@@ -0,0 +1,18 @@
|
||||
//// [tests/cases/compiler/mergeWithImportedType.ts] ////
|
||||
|
||||
//// [f1.ts]
|
||||
export enum E {X}
|
||||
|
||||
//// [f2.ts]
|
||||
import {E} from "./f1";
|
||||
// partial revert of https://github.com/Microsoft/TypeScript/pull/7583 to prevent breaking changes
|
||||
export type E = E;
|
||||
|
||||
//// [f1.js]
|
||||
"use strict";
|
||||
(function (E) {
|
||||
E[E["X"] = 0] = "X";
|
||||
})(exports.E || (exports.E = {}));
|
||||
var E = exports.E;
|
||||
//// [f2.js]
|
||||
"use strict";
|
||||
14
tests/baselines/reference/mergeWithImportedType.symbols
Normal file
14
tests/baselines/reference/mergeWithImportedType.symbols
Normal file
@@ -0,0 +1,14 @@
|
||||
=== tests/cases/compiler/f1.ts ===
|
||||
export enum E {X}
|
||||
>E : Symbol(E, Decl(f1.ts, 0, 0))
|
||||
>X : Symbol(E.X, Decl(f1.ts, 0, 15))
|
||||
|
||||
=== tests/cases/compiler/f2.ts ===
|
||||
import {E} from "./f1";
|
||||
>E : Symbol(E, Decl(f2.ts, 0, 8), Decl(f2.ts, 0, 23))
|
||||
|
||||
// partial revert of https://github.com/Microsoft/TypeScript/pull/7583 to prevent breaking changes
|
||||
export type E = E;
|
||||
>E : Symbol(E, Decl(f2.ts, 0, 23))
|
||||
>E : Symbol(E, Decl(f2.ts, 0, 8), Decl(f2.ts, 0, 23))
|
||||
|
||||
14
tests/baselines/reference/mergeWithImportedType.types
Normal file
14
tests/baselines/reference/mergeWithImportedType.types
Normal file
@@ -0,0 +1,14 @@
|
||||
=== tests/cases/compiler/f1.ts ===
|
||||
export enum E {X}
|
||||
>E : E
|
||||
>X : E
|
||||
|
||||
=== tests/cases/compiler/f2.ts ===
|
||||
import {E} from "./f1";
|
||||
>E : typeof E
|
||||
|
||||
// partial revert of https://github.com/Microsoft/TypeScript/pull/7583 to prevent breaking changes
|
||||
export type E = E;
|
||||
>E : E
|
||||
>E : E
|
||||
|
||||
10
tests/cases/compiler/mergeWithImportedNamespace.ts
Normal file
10
tests/cases/compiler/mergeWithImportedNamespace.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
// @module:commonjs
|
||||
// @filename: f1.ts
|
||||
export namespace N { export var x = 1; }
|
||||
|
||||
// @filename: f2.ts
|
||||
import {N} from "./f1";
|
||||
// partial revert of https://github.com/Microsoft/TypeScript/pull/7583 to prevent breaking changes
|
||||
export namespace N {
|
||||
export interface I {x: any}
|
||||
}
|
||||
8
tests/cases/compiler/mergeWithImportedType.ts
Normal file
8
tests/cases/compiler/mergeWithImportedType.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
// @module:commonjs
|
||||
// @filename: f1.ts
|
||||
export enum E {X}
|
||||
|
||||
// @filename: f2.ts
|
||||
import {E} from "./f1";
|
||||
// partial revert of https://github.com/Microsoft/TypeScript/pull/7583 to prevent breaking changes
|
||||
export type E = E;
|
||||
Reference in New Issue
Block a user