File: typeFromPropertyAssignment32.errors.txt

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (44 lines) | stat: -rw-r--r-- 2,067 bytes parent folder | download | duplicates (4)
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
42
43
44
tests/cases/conformance/salsa/expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'.
tests/cases/conformance/salsa/expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'.
tests/cases/conformance/salsa/ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
tests/cases/conformance/salsa/ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.


==== tests/cases/conformance/salsa/expando.ts (2 errors) ====
    function ExpandoMerge(n: number) {
        return n;
    }
    ExpandoMerge.p1 = 111
    ExpandoMerge.m = function(n: number) {
        return n + 1;
    }
    ExpandoMerge.p4 = 44444;
    ExpandoMerge.p5 = 555555;
    ExpandoMerge.p6 = 66666;
    ExpandoMerge.p7 = 777777;
    ExpandoMerge.p8 = false; // type error
    ~~~~~~~~~~~~~~~
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
    ExpandoMerge.p9 = false; // type error
    ~~~~~~~~~~~~~~~
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
    var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001);
    
==== tests/cases/conformance/salsa/ns.ts (2 errors) ====
    namespace ExpandoMerge {
              ~~~~~~~~~~~~
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
        export var p3 = 333;
        export var p4 = 4;
        export var p5 = 5;
        export let p6 = 6;
        export let p7 = 7;
        export var p8 = 6;
        export let p9 = 7;
    }
    namespace ExpandoMerge {
              ~~~~~~~~~~~~
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
        export var p2 = 222;
    }