File: propertyAccessStringIndexSignatureNoImplicitAny.types

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 (41 lines) | stat: -rw-r--r-- 833 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
=== tests/cases/conformance/expressions/propertyAccess/propertyAccessStringIndexSignatureNoImplicitAny.ts ===
interface Flags { [name: string]: boolean }
>name : string

let flags: Flags;
>flags : Flags

flags.b;
>flags.b : boolean
>flags : Flags
>b : boolean

flags.f;
>flags.f : boolean
>flags : Flags
>f : boolean

flags.isNotNecessarilyNeverFalse;
>flags.isNotNecessarilyNeverFalse : boolean
>flags : Flags
>isNotNecessarilyNeverFalse : boolean

flags['this is fine'];
>flags['this is fine'] : boolean
>flags : Flags
>'this is fine' : "this is fine"

interface Empty { }
let empty: Empty;
>empty : Empty

empty.nope;
>empty.nope : any
>empty : Empty
>nope : any

empty["not allowed either"];
>empty["not allowed either"] : any
>empty : Empty
>"not allowed either" : "not allowed either"