File: nativeToBoxedTypes.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (36 lines) | stat: -rw-r--r-- 1,711 bytes parent folder | download | duplicates (2)
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
tests/cases/compiler/nativeToBoxedTypes.ts(3,1): error TS2322: Type 'Number' is not assignable to type 'number'.
  'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible.
tests/cases/compiler/nativeToBoxedTypes.ts(7,1): error TS2322: Type 'String' is not assignable to type 'string'.
  'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible.
tests/cases/compiler/nativeToBoxedTypes.ts(11,1): error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
  'boolean' is a primitive, but 'Boolean' is a wrapper object. Prefer using 'boolean' when possible.
tests/cases/compiler/nativeToBoxedTypes.ts(14,10): error TS2304: Cannot find name 'Symbol'.


==== tests/cases/compiler/nativeToBoxedTypes.ts (4 errors) ====
    var N = new Number();
    var n = 100;
    n = N;
    ~
!!! error TS2322: Type 'Number' is not assignable to type 'number'.
!!! error TS2322:   'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible.
    
    var S = new String();
    var s = "foge";
    s = S;
    ~
!!! error TS2322: Type 'String' is not assignable to type 'string'.
!!! error TS2322:   'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible.
    
    var B = new Boolean();
    var b = true;
    b = B;
    ~
!!! error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
!!! error TS2322:   'boolean' is a primitive, but 'Boolean' is a wrapper object. Prefer using 'boolean' when possible.
    
    var sym: symbol; 
    var Sym: Symbol;
             ~~~~~~
!!! error TS2304: Cannot find name 'Symbol'.
    sym = Sym;