File: letConstMatchingParameterNames.types

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 (41 lines) | stat: -rw-r--r-- 701 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
=== tests/cases/compiler/letConstMatchingParameterNames.ts ===
let parent = true;
>parent : boolean
>true : true

const parent2 = true;
>parent2 : true
>true : true

declare function use(a: any);
>use : (a: any) => any
>a : any

function a() {
>a : () => void
    
    let parent = 1;
>parent : number
>1 : 1

    const parent2 = 2;
>parent2 : 2
>2 : 2

    function b(parent: string, parent2: number) {
>b : (parent: string, parent2: number) => void
>parent : string
>parent2 : number

        use(parent);
>use(parent) : any
>use : (a: any) => any
>parent : string

        use(parent2);
>use(parent2) : any
>use : (a: any) => any
>parent2 : number
    }
}