forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathissue52912.js
More file actions
33 lines (26 loc) · 885 Bytes
/
issue52912.js
File metadata and controls
33 lines (26 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//// [tests/cases/compiler/issue52912.ts] ////
//// [issue52912.ts]
// Repro from #52912
type Source1 = { array: Source2[] };
type Source2 = { array: Source3[] };
type Source3 = { array: Source4[] };
type Source4 = {};
type Target1 = { array: Target2[] };
type Target2 = { array: Target3[] };
type Target3 = { array: Target4[] };
type Target4 = { someNewProperty: string };
declare const source1: Source1;
declare const source2: Source2;
declare const source3: Source3;
declare const source4: Source4;
const target1: Target1 = source1; // Error
const target2: Target2 = source2; // Error
const target3: Target3 = source3; // Error
const target4: Target4 = source4; // Error
//// [issue52912.js]
"use strict";
// Repro from #52912
const target1 = source1; // Error
const target2 = source2; // Error
const target3 = source3; // Error
const target4 = source4; // Error