The parameter problem when the typescript parameter is a class

I have defined an abstract class
I have multiple subclasses to implement abstract methods of abstract classes

export abstract class Base {
    doSomeThing() {

    }
    abstract beforeDo():void;
}
class work extends Base {
    beforeDo() {
        console.log("work")
    }
}
class study extends Base {
    beforeDo() {
        console.log("study")
    }    
}
function dd(doo: Base) {
    new doo();
}

but I have to report an error when I go to new like this. Please tell me how to deal with this problem-sharp-sharp-sharp topic description

sources of topics and their own ideas

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Nov.08,2021

Abstract classes cannot be instantiated, you can do so

export class Base {
    doSomeThing() {

    }
    beforeDo(){throw new Error('error')}
}

also, your parameter declaration type is wrong. It should be typeof Base

.
function dd<T extends Base> (doo: { new(): T }) {
  const x = new doo()
}

it is estimated that what you want is this

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e49b28-59da3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e49b28-59da3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?