Skip to content

Commit 3a0a58d

Browse files
committed
Accept new baselines
1 parent a8de5ce commit 3a0a58d

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

tests/baselines/reference/mixinClassesAnonymous.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ class Thing3 extends Thing2 {
5555
this.print();
5656
}
5757
}
58+
59+
// Repro from #13805
60+
61+
const Timestamped = <CT extends Constructor<object>>(Base: CT) => {
62+
return class extends Base {
63+
timestamp = new Date();
64+
};
65+
}
5866

5967

6068
//// [mixinClassesAnonymous.js]
@@ -138,3 +146,15 @@ var Thing3 = (function (_super) {
138146
};
139147
return Thing3;
140148
}(Thing2));
149+
// Repro from #13805
150+
var Timestamped = function (Base) {
151+
return (function (_super) {
152+
__extends(class_2, _super);
153+
function class_2() {
154+
var _this = _super !== null && _super.apply(this, arguments) || this;
155+
_this.timestamp = new Date();
156+
return _this;
157+
}
158+
return class_2;
159+
}(Base));
160+
};

tests/baselines/reference/mixinClassesAnonymous.symbols

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,22 @@ class Thing3 extends Thing2 {
167167
}
168168
}
169169

170+
// Repro from #13805
171+
172+
const Timestamped = <CT extends Constructor<object>>(Base: CT) => {
173+
>Timestamped : Symbol(Timestamped, Decl(mixinClassesAnonymous.ts, 59, 5))
174+
>CT : Symbol(CT, Decl(mixinClassesAnonymous.ts, 59, 21))
175+
>Constructor : Symbol(Constructor, Decl(mixinClassesAnonymous.ts, 0, 0))
176+
>Base : Symbol(Base, Decl(mixinClassesAnonymous.ts, 59, 53))
177+
>CT : Symbol(CT, Decl(mixinClassesAnonymous.ts, 59, 21))
178+
179+
return class extends Base {
180+
>Base : Symbol(Base, Decl(mixinClassesAnonymous.ts, 59, 53))
181+
182+
timestamp = new Date();
183+
>timestamp : Symbol((Anonymous class).timestamp, Decl(mixinClassesAnonymous.ts, 60, 31))
184+
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
185+
186+
};
187+
}
188+

tests/baselines/reference/mixinClassesAnonymous.types

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,25 @@ class Thing3 extends Thing2 {
198198
}
199199
}
200200

201+
// Repro from #13805
202+
203+
const Timestamped = <CT extends Constructor<object>>(Base: CT) => {
204+
>Timestamped : <CT extends Constructor<object>>(Base: CT) => { new (...args: any[]): (Anonymous class); prototype: <any>.(Anonymous class); } & CT
205+
><CT extends Constructor<object>>(Base: CT) => { return class extends Base { timestamp = new Date(); };} : <CT extends Constructor<object>>(Base: CT) => { new (...args: any[]): (Anonymous class); prototype: <any>.(Anonymous class); } & CT
206+
>CT : CT
207+
>Constructor : Constructor<T>
208+
>Base : CT
209+
>CT : CT
210+
211+
return class extends Base {
212+
>class extends Base { timestamp = new Date(); } : { new (...args: any[]): (Anonymous class); prototype: <any>.(Anonymous class); } & CT
213+
>Base : object
214+
215+
timestamp = new Date();
216+
>timestamp : Date
217+
>new Date() : Date
218+
>Date : DateConstructor
219+
220+
};
221+
}
222+

0 commit comments

Comments
 (0)