File: _expected.js

package info (click to toggle)
node-rollup 3.29.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 53,520 kB
  • sloc: javascript: 115,081; sh: 26; makefile: 18
file content (39 lines) | stat: -rw-r--r-- 907 bytes parent folder | download | duplicates (2)
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
const retained1 = () => globalThis.unknown ? retained1() : console.log( 'effect' );
retained1();

const retained2 = () => globalThis.unknown ? () => retained2()() : () => console.log( 'effect' );
retained2()();

const retained3 = () => globalThis.unknown ? retained3() : {};
retained3().x.y = 3;

const retained4 = () => globalThis.unknown ? retained4() : { x: () => console.log( 'effect' ) };
retained4().x();

const retained5 = {
	get x () {
		return globalThis.unknown ? retained5.x : console.log( 'effect' );
	}
};
retained5.x;

const retained6 = {
	get x () {
		return globalThis.unknown ? retained6.x : () => console.log( 'effect' );
	}
};
retained6.x();

const retained7 = {
	get x () {
		return globalThis.unknown ? retained7.x : {};
	}
};
retained7.x.y.z = 7;

const retained8 = {
	get x () {
		return globalThis.unknown ? retained8.x : { y: () => console.log( 'effect' ) };
	}
};
retained8.x.y();