mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Accept new baselines
This commit is contained in:
@@ -55,6 +55,14 @@ class Thing3 extends Thing2 {
|
||||
this.print();
|
||||
}
|
||||
}
|
||||
|
||||
// Repro from #13805
|
||||
|
||||
const Timestamped = <CT extends Constructor<object>>(Base: CT) => {
|
||||
return class extends Base {
|
||||
timestamp = new Date();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//// [mixinClassesAnonymous.js]
|
||||
@@ -138,3 +146,15 @@ var Thing3 = (function (_super) {
|
||||
};
|
||||
return Thing3;
|
||||
}(Thing2));
|
||||
// Repro from #13805
|
||||
var Timestamped = function (Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_2, _super);
|
||||
function class_2() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.timestamp = new Date();
|
||||
return _this;
|
||||
}
|
||||
return class_2;
|
||||
}(Base));
|
||||
};
|
||||
|
||||
@@ -167,3 +167,22 @@ class Thing3 extends Thing2 {
|
||||
}
|
||||
}
|
||||
|
||||
// Repro from #13805
|
||||
|
||||
const Timestamped = <CT extends Constructor<object>>(Base: CT) => {
|
||||
>Timestamped : Symbol(Timestamped, Decl(mixinClassesAnonymous.ts, 59, 5))
|
||||
>CT : Symbol(CT, Decl(mixinClassesAnonymous.ts, 59, 21))
|
||||
>Constructor : Symbol(Constructor, Decl(mixinClassesAnonymous.ts, 0, 0))
|
||||
>Base : Symbol(Base, Decl(mixinClassesAnonymous.ts, 59, 53))
|
||||
>CT : Symbol(CT, Decl(mixinClassesAnonymous.ts, 59, 21))
|
||||
|
||||
return class extends Base {
|
||||
>Base : Symbol(Base, Decl(mixinClassesAnonymous.ts, 59, 53))
|
||||
|
||||
timestamp = new Date();
|
||||
>timestamp : Symbol((Anonymous class).timestamp, Decl(mixinClassesAnonymous.ts, 60, 31))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -198,3 +198,25 @@ class Thing3 extends Thing2 {
|
||||
}
|
||||
}
|
||||
|
||||
// Repro from #13805
|
||||
|
||||
const Timestamped = <CT extends Constructor<object>>(Base: CT) => {
|
||||
>Timestamped : <CT extends Constructor<object>>(Base: CT) => { new (...args: any[]): (Anonymous class); prototype: <any>.(Anonymous class); } & CT
|
||||
><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
|
||||
>CT : CT
|
||||
>Constructor : Constructor<T>
|
||||
>Base : CT
|
||||
>CT : CT
|
||||
|
||||
return class extends Base {
|
||||
>class extends Base { timestamp = new Date(); } : { new (...args: any[]): (Anonymous class); prototype: <any>.(Anonymous class); } & CT
|
||||
>Base : object
|
||||
|
||||
timestamp = new Date();
|
||||
>timestamp : Date
|
||||
>new Date() : Date
|
||||
>Date : DateConstructor
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user