mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
29 lines
482 B
TypeScript
29 lines
482 B
TypeScript
// @strict: true
|
|
// @noEmit: true
|
|
|
|
// https://github.com/microsoft/TypeScript/issues/62921
|
|
|
|
class Abstract {
|
|
protected constructor() {
|
|
}
|
|
}
|
|
|
|
class Concrete extends Abstract {
|
|
}
|
|
|
|
type Constructor<T = {}> = new (...args?: any[]) => T;
|
|
|
|
function Mixin<TBase extends Constructor>(Base: TBase) {
|
|
return class extends Base {
|
|
};
|
|
}
|
|
|
|
class Empty {
|
|
}
|
|
|
|
class CrashTrigger extends Mixin(Empty) {
|
|
public trigger() {
|
|
new Concrete();
|
|
}
|
|
}
|