File: jsdocDisallowedInTypescript.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (75 lines) | stat: -rw-r--r-- 5,272 bytes parent folder | download
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(2,15): error TS8020: JSDoc types can only be used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(4,15): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'?
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(4,32): error TS8020: JSDoc types can only be used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(7,20): error TS8020: JSDoc types can only be used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(10,18): error TS8020: JSDoc types can only be used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(11,18): error TS2554: Expected 1 arguments, but got 2.
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(13,14): error TS8020: JSDoc types can only be used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(14,11): error TS8020: JSDoc types can only be used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(15,8): error TS8020: JSDoc types can only be used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(16,11): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'?
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(17,17): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'?
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(18,5): error TS2322: Type 'undefined' is not assignable to type 'number | null'.
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(18,17): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'?
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(20,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'?
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(21,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'?
tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts(22,17): error TS8020: JSDoc types can only be used inside documentation comments.


==== tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts (16 errors) ====
    // grammar error from checker
    var ara: Array.<number> = [1,2,3];
                  ~
!!! error TS8020: JSDoc types can only be used inside documentation comments.
    
    function f(x: ?number, y: Array.<number>) {
                  ~~~~~~~
!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'?
                                   ~
!!! error TS8020: JSDoc types can only be used inside documentation comments.
        return x ? x + y[1] : y[0];
    }
    function hof(ctor: function(new: number, string)) {
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS8020: JSDoc types can only be used inside documentation comments.
        return new ctor('hi');
    }
    function hof2(f: function(this: number, string): string) {
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS8020: JSDoc types can only be used inside documentation comments.
        return f(12, 'hullo');
                     ~~~~~~~
!!! error TS2554: Expected 1 arguments, but got 2.
    }
    var whatevs: * = 1001;
                 ~
!!! error TS8020: JSDoc types can only be used inside documentation comments.
    var ques: ? = 'what';
              ~
!!! error TS8020: JSDoc types can only be used inside documentation comments.
    var g: function(number, number): number = (n,m) => n + m;
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS8020: JSDoc types can only be used inside documentation comments.
    var most: !string = 'definite';
              ~~~~~~~
!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'?
    var postfixdef: number! = 101;
                    ~~~~~~~
!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'?
    var postfixopt: number? = undefined;
        ~~~~~~~~~~
!!! error TS2322: Type 'undefined' is not assignable to type 'number | null'.
                    ~~~~~~~
!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'?
    
    var nns: Array<?number>;
                   ~~~~~~~
!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'?
    var dns: Array<!number>;
                   ~~~~~~~
!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'?
    var anys: Array<*>;
                    ~
!!! error TS8020: JSDoc types can only be used inside documentation comments.