Answers for "typescript pass class method as parameter"

C
0

typescript class as function parameter

class A {}

function create(ctor: { new(): A }): A {
    return new ctor();
}

let a = create(A); // a is instanceof A
Posted by: Guest on September-17-2021

Code answers related to "typescript pass class method as parameter"

Code answers related to "C"

Browse Popular Code Answers by Language