File: intersectionTypeAssignment.errors.txt

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (41 lines) | stat: -rw-r--r-- 2,510 bytes parent folder | download | duplicates (5)
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
34
35
36
37
38
39
40
41
tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts(8,1): error TS2741: Property 'b' is missing in type '{ a: string; }' but required in type '{ a: string; b: string; }'.
tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts(9,1): error TS2322: Type '{ a: string; }' is not assignable to type '{ a: string; } & { b: string; }'.
  Property 'b' is missing in type '{ a: string; }' but required in type '{ b: string; }'.
tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts(13,1): error TS2741: Property 'a' is missing in type '{ b: string; }' but required in type '{ a: string; b: string; }'.
tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts(14,1): error TS2322: Type '{ b: string; }' is not assignable to type '{ a: string; } & { b: string; }'.
  Property 'a' is missing in type '{ b: string; }' but required in type '{ a: string; }'.


==== tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts (4 errors) ====
    var a: { a: string };
    var b: { b: string };
    var x: { a: string, b: string };
    var y: { a: string } & { b: string };
    
    a = x;
    a = y;
    x = a;  // Error
    ~
!!! error TS2741: Property 'b' is missing in type '{ a: string; }' but required in type '{ a: string; b: string; }'.
!!! related TS2728 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:3:21: 'b' is declared here.
    y = a;  // Error
    ~
!!! error TS2322: Type '{ a: string; }' is not assignable to type '{ a: string; } & { b: string; }'.
!!! error TS2322:   Property 'b' is missing in type '{ a: string; }' but required in type '{ b: string; }'.
!!! related TS2728 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:4:26: 'b' is declared here.
    
    b = x;
    b = y;
    x = b;  // Error
    ~
!!! error TS2741: Property 'a' is missing in type '{ b: string; }' but required in type '{ a: string; b: string; }'.
!!! related TS2728 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:3:10: 'a' is declared here.
    y = b;  // Error
    ~
!!! error TS2322: Type '{ b: string; }' is not assignable to type '{ a: string; } & { b: string; }'.
!!! error TS2322:   Property 'a' is missing in type '{ b: string; }' but required in type '{ a: string; }'.
!!! related TS2728 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:4:10: 'a' is declared here.
    
    x = y;
    y = x;