File: stringLiteralTypesInImplementationSignatures.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 (66 lines) | stat: -rw-r--r-- 2,861 bytes parent folder | download | duplicates (7)
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
=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts ===
// String literal types are only valid in overload signatures

function foo(x: 'hi') { }
>foo : Symbol(foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 0, 0))
>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 2, 13))

var f = function foo(x: 'hi') { }
>f : Symbol(f, Decl(stringLiteralTypesInImplementationSignatures.ts, 3, 3))
>foo : Symbol(foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 3, 7))
>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 3, 21))

var f2 = (x: 'hi', y: 'hi') => { }
>f2 : Symbol(f2, Decl(stringLiteralTypesInImplementationSignatures.ts, 4, 3))
>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 4, 10))
>y : Symbol(y, Decl(stringLiteralTypesInImplementationSignatures.ts, 4, 18))

class C {
>C : Symbol(C, Decl(stringLiteralTypesInImplementationSignatures.ts, 4, 34))

    foo(x: 'hi') { }
>foo : Symbol(C.foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 6, 9))
>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 7, 8))
}

interface I {
>I : Symbol(I, Decl(stringLiteralTypesInImplementationSignatures.ts, 8, 1))

    (x: 'hi');
>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 11, 5))

    foo(x: 'hi', y: 'hi');
>foo : Symbol(I.foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 11, 14))
>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 12, 8))
>y : Symbol(y, Decl(stringLiteralTypesInImplementationSignatures.ts, 12, 16))
}

var a: {
>a : Symbol(a, Decl(stringLiteralTypesInImplementationSignatures.ts, 15, 3))

    (x: 'hi');
>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 16, 5))

    foo(x: 'hi');
>foo : Symbol(foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 16, 14))
>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 17, 8))
}

var b = {
>b : Symbol(b, Decl(stringLiteralTypesInImplementationSignatures.ts, 20, 3))

    foo(x: 'hi') { },
>foo : Symbol(foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 20, 9))
>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 21, 8))

    a: function foo(x: 'hi', y: 'hi') { },
>a : Symbol(a, Decl(stringLiteralTypesInImplementationSignatures.ts, 21, 21))
>foo : Symbol(foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 22, 6))
>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 22, 20))
>y : Symbol(y, Decl(stringLiteralTypesInImplementationSignatures.ts, 22, 28))

    b: (x: 'hi') => { }
>b : Symbol(b, Decl(stringLiteralTypesInImplementationSignatures.ts, 22, 42))
>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 23, 8))
}