File: typeGuardNarrowByUntypedField.symbols

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 (27 lines) | stat: -rw-r--r-- 1,720 bytes parent folder | download | duplicates (3)
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
=== tests/cases/compiler/typeGuardNarrowByUntypedField.ts ===
declare function hasOwnProperty<P extends PropertyKey>(target: {}, property: P): target is { readonly [K in P]: unknown };
>hasOwnProperty : Symbol(hasOwnProperty, Decl(typeGuardNarrowByUntypedField.ts, 0, 0))
>P : Symbol(P, Decl(typeGuardNarrowByUntypedField.ts, 0, 32))
>PropertyKey : Symbol(PropertyKey, Decl(lib.es5.d.ts, --, --))
>target : Symbol(target, Decl(typeGuardNarrowByUntypedField.ts, 0, 55))
>property : Symbol(property, Decl(typeGuardNarrowByUntypedField.ts, 0, 66))
>P : Symbol(P, Decl(typeGuardNarrowByUntypedField.ts, 0, 32))
>target : Symbol(target, Decl(typeGuardNarrowByUntypedField.ts, 0, 55))
>K : Symbol(K, Decl(typeGuardNarrowByUntypedField.ts, 0, 103))
>P : Symbol(P, Decl(typeGuardNarrowByUntypedField.ts, 0, 32))

declare const arrayLikeOrIterable: ArrayLike<any> | Iterable<any>;
>arrayLikeOrIterable : Symbol(arrayLikeOrIterable, Decl(typeGuardNarrowByUntypedField.ts, 1, 13))
>ArrayLike : Symbol(ArrayLike, Decl(lib.es5.d.ts, --, --))
>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))

if (hasOwnProperty(arrayLikeOrIterable, 'length')) {
>hasOwnProperty : Symbol(hasOwnProperty, Decl(typeGuardNarrowByUntypedField.ts, 0, 0))
>arrayLikeOrIterable : Symbol(arrayLikeOrIterable, Decl(typeGuardNarrowByUntypedField.ts, 1, 13))

    let x: number = arrayLikeOrIterable.length;
>x : Symbol(x, Decl(typeGuardNarrowByUntypedField.ts, 3, 7))
>arrayLikeOrIterable.length : Symbol(ArrayLike.length, Decl(lib.es5.d.ts, --, --))
>arrayLikeOrIterable : Symbol(arrayLikeOrIterable, Decl(typeGuardNarrowByUntypedField.ts, 1, 13))
>length : Symbol(ArrayLike.length, Decl(lib.es5.d.ts, --, --))
}