File: interfaceDeclaration4.symbols

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 (86 lines) | stat: -rw-r--r-- 3,468 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
=== tests/cases/compiler/interfaceDeclaration4.ts ===
// Import this module when test harness supports external modules. Also remove the internal module below.
// import Foo = require("interfaceDeclaration5")
module Foo {
>Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30))

    export interface I1 { item: string; }
>I1 : Symbol(I1, Decl(interfaceDeclaration4.ts, 2, 12))
>item : Symbol(I1.item, Decl(interfaceDeclaration4.ts, 3, 25))

    export class C1 { }
>C1 : Symbol(C1, Decl(interfaceDeclaration4.ts, 3, 41))
}

class C1 implements Foo.I1 {
>C1 : Symbol(C1, Decl(interfaceDeclaration4.ts, 5, 1))
>Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12))
>Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30))
>I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12))

	public item:string;
>item : Symbol(C1.item, Decl(interfaceDeclaration4.ts, 7, 28))
}

// Allowed
interface I2 extends Foo.I1 {
>I2 : Symbol(I2, Decl(interfaceDeclaration4.ts, 9, 1))
>Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12))
>Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30))
>I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12))

	item:string;
>item : Symbol(I2.item, Decl(interfaceDeclaration4.ts, 12, 29))
}

// Negative Case
interface I3 extends Foo.I1 {
>I3 : Symbol(I3, Decl(interfaceDeclaration4.ts, 14, 1))
>Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12))
>Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30))
>I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12))

    item:number;
>item : Symbol(I3.item, Decl(interfaceDeclaration4.ts, 17, 29))
}

interface I4 extends Foo.I1 {
>I4 : Symbol(I4, Decl(interfaceDeclaration4.ts, 19, 1))
>Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12))
>Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30))
>I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12))

    token:string;
>token : Symbol(I4.token, Decl(interfaceDeclaration4.ts, 21, 29))
}

// Err - not implemented item
class C2 implements I4 {
>C2 : Symbol(C2, Decl(interfaceDeclaration4.ts, 23, 1))
>I4 : Symbol(I4, Decl(interfaceDeclaration4.ts, 19, 1))

    public token: string;
>token : Symbol(C2.token, Decl(interfaceDeclaration4.ts, 26, 24))
}

interface I5 extends Foo { }
>I5 : Symbol(I5, Decl(interfaceDeclaration4.ts, 28, 1))
>Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30))

// Negative case
interface I6 extends Foo.C1 { }
>I6 : Symbol(I6, Decl(interfaceDeclaration4.ts, 30, 28))
>Foo.C1 : Symbol(Foo.C1, Decl(interfaceDeclaration4.ts, 3, 41))
>Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30))
>C1 : Symbol(Foo.C1, Decl(interfaceDeclaration4.ts, 3, 41))

class C3 implements Foo.I1 { }
>C3 : Symbol(C3, Decl(interfaceDeclaration4.ts, 33, 31))
>Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12))
>Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30))
>I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12))

// Negative case 
interface Foo.I1 { }
>Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30))