File: objectRestReadonly.symbols

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 (40 lines) | stat: -rw-r--r-- 1,220 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
=== tests/cases/conformance/types/rest/objectRestReadonly.ts ===
// #23734
type ObjType = {
>ObjType : Symbol(ObjType, Decl(objectRestReadonly.ts, 0, 0))

  foo: string
>foo : Symbol(foo, Decl(objectRestReadonly.ts, 1, 16))

  baz: string
>baz : Symbol(baz, Decl(objectRestReadonly.ts, 2, 13))

  quux: string
>quux : Symbol(quux, Decl(objectRestReadonly.ts, 3, 13))
}

const obj: Readonly<ObjType> = {
>obj : Symbol(obj, Decl(objectRestReadonly.ts, 7, 5))
>Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --))
>ObjType : Symbol(ObjType, Decl(objectRestReadonly.ts, 0, 0))

  foo: 'bar',
>foo : Symbol(foo, Decl(objectRestReadonly.ts, 7, 32))

  baz: 'qux',
>baz : Symbol(baz, Decl(objectRestReadonly.ts, 8, 13))

  quux: 'quuz',
>quux : Symbol(quux, Decl(objectRestReadonly.ts, 9, 13))
}

const { foo, ...rest } = obj
>foo : Symbol(foo, Decl(objectRestReadonly.ts, 13, 7))
>rest : Symbol(rest, Decl(objectRestReadonly.ts, 13, 12))
>obj : Symbol(obj, Decl(objectRestReadonly.ts, 7, 5))

delete rest.baz
>rest.baz : Symbol(baz, Decl(objectRestReadonly.ts, 2, 13))
>rest : Symbol(rest, Decl(objectRestReadonly.ts, 13, 12))
>baz : Symbol(baz, Decl(objectRestReadonly.ts, 2, 13))