@@ -29,7 +29,7 @@ function validate() {
29
29
30
30
if(Math.random() > 0.5) {
31
31
>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
32
- >Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
32
+ >Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.float16.d.ts, --, --) )
33
33
>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
34
34
35
35
return utilValidate();
@@ -63,3 +63,67 @@ validate().msg; // Error in TSGO
63
63
>validate : Symbol(validate, Decl(freshObjectLiteralSubtype.ts, 9, 8))
64
64
>msg : Symbol(msg, Decl(freshObjectLiteralSubtype.ts, 22, 19), Decl(freshObjectLiteralSubtype.ts, 25, 19))
65
65
66
+ // https://github.com/microsoft/typescript-go/issues/1761
67
+
68
+ function normalise_trace_logs([log]: any[]) {
69
+ >normalise_trace_logs : Symbol(normalise_trace_logs, Decl(freshObjectLiteralSubtype.ts, 29, 15))
70
+ >log : Symbol(log, Decl(freshObjectLiteralSubtype.ts, 33, 31))
71
+
72
+ let normalised = [];
73
+ >normalised : Symbol(normalised, Decl(freshObjectLiteralSubtype.ts, 34, 4))
74
+
75
+ if (typeof log === "string" && log.includes("%c")) {
76
+ >log : Symbol(log, Decl(freshObjectLiteralSubtype.ts, 33, 31))
77
+ >log.includes : Symbol(String.includes, Decl(lib.es2015.core.d.ts, --, --))
78
+ >log : Symbol(log, Decl(freshObjectLiteralSubtype.ts, 33, 31))
79
+ >includes : Symbol(String.includes, Decl(lib.es2015.core.d.ts, --, --))
80
+
81
+ normalised.push({ log, highlighted: log.includes("foo") });
82
+ >normalised.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
83
+ >normalised : Symbol(normalised, Decl(freshObjectLiteralSubtype.ts, 34, 4))
84
+ >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
85
+ >log : Symbol(log, Decl(freshObjectLiteralSubtype.ts, 36, 25))
86
+ >highlighted : Symbol(highlighted, Decl(freshObjectLiteralSubtype.ts, 36, 30))
87
+ >log.includes : Symbol(String.includes, Decl(lib.es2015.core.d.ts, --, --))
88
+ >log : Symbol(log, Decl(freshObjectLiteralSubtype.ts, 33, 31))
89
+ >includes : Symbol(String.includes, Decl(lib.es2015.core.d.ts, --, --))
90
+
91
+ } else {
92
+ normalised.push({ log });
93
+ >normalised.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
94
+ >normalised : Symbol(normalised, Decl(freshObjectLiteralSubtype.ts, 34, 4))
95
+ >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
96
+ >log : Symbol(log, Decl(freshObjectLiteralSubtype.ts, 38, 25))
97
+ }
98
+ return normalised;
99
+ >normalised : Symbol(normalised, Decl(freshObjectLiteralSubtype.ts, 34, 4))
100
+ }
101
+
102
+ function equal<T>(_actual: T, _expected: T): void {}
103
+ >equal : Symbol(equal, Decl(freshObjectLiteralSubtype.ts, 41, 1))
104
+ >T : Symbol(T, Decl(freshObjectLiteralSubtype.ts, 43, 15))
105
+ >_actual : Symbol(_actual, Decl(freshObjectLiteralSubtype.ts, 43, 18))
106
+ >T : Symbol(T, Decl(freshObjectLiteralSubtype.ts, 43, 15))
107
+ >_expected : Symbol(_expected, Decl(freshObjectLiteralSubtype.ts, 43, 29))
108
+ >T : Symbol(T, Decl(freshObjectLiteralSubtype.ts, 43, 15))
109
+
110
+ equal(normalise_trace_logs([]), [
111
+ >equal : Symbol(equal, Decl(freshObjectLiteralSubtype.ts, 41, 1))
112
+ >normalise_trace_logs : Symbol(normalise_trace_logs, Decl(freshObjectLiteralSubtype.ts, 29, 15))
113
+
114
+ { log: 'effect' },
115
+ >log : Symbol(log, Decl(freshObjectLiteralSubtype.ts, 46, 5))
116
+
117
+ { log: '$derived', highlighted: true },
118
+ >log : Symbol(log, Decl(freshObjectLiteralSubtype.ts, 47, 5))
119
+ >highlighted : Symbol(highlighted, Decl(freshObjectLiteralSubtype.ts, 47, 22))
120
+
121
+ { log: 'double', highlighted: false },
122
+ >log : Symbol(log, Decl(freshObjectLiteralSubtype.ts, 48, 5))
123
+ >highlighted : Symbol(highlighted, Decl(freshObjectLiteralSubtype.ts, 48, 20))
124
+
125
+ { log: 4 },
126
+ >log : Symbol(log, Decl(freshObjectLiteralSubtype.ts, 49, 5))
127
+
128
+ ]);
129
+
0 commit comments