File: declFileTypeAnnotationTypeLiteral.js

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 (91 lines) | stat: -rw-r--r-- 1,578 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
//// [declFileTypeAnnotationTypeLiteral.ts]
class c {
}
class g<T> {
}
module m {
    export class c {
    }
}

// Object literal with everything
var x: {
    // Call signatures
    (a: number): c;
    (a: string): g<string>;

    // Construct signatures
    new (a: number): c;
    new (a: string): m.c;

    // Indexers
    [n: number]: c;
    [n: string]: c;

    // Properties
    a: c;
    b: g<string>;

    // methods
    m1(): g<number>;
    m2(a: string, b?: number, ...c: c[]): string;
};


// Function type
var y: (a: string) => string;

// constructor type
var z: new (a: string) => m.c;

//// [declFileTypeAnnotationTypeLiteral.js]
var c = /** @class */ (function () {
    function c() {
    }
    return c;
}());
var g = /** @class */ (function () {
    function g() {
    }
    return g;
}());
var m;
(function (m) {
    var c = /** @class */ (function () {
        function c() {
        }
        return c;
    }());
    m.c = c;
})(m || (m = {}));
// Object literal with everything
var x;
// Function type
var y;
// constructor type
var z;


//// [declFileTypeAnnotationTypeLiteral.d.ts]
declare class c {
}
declare class g<T> {
}
declare module m {
    class c {
    }
}
declare var x: {
    (a: number): c;
    (a: string): g<string>;
    new (a: number): c;
    new (a: string): m.c;
    [n: number]: c;
    [n: string]: c;
    a: c;
    b: g<string>;
    m1(): g<number>;
    m2(a: string, b?: number, ...c: c[]): string;
};
declare var y: (a: string) => string;
declare var z: new (a: string) => m.c;