All files components.ts

0% Statements 0/8
100% Branches 0/0
0% Functions 0/5
0% Lines 0/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19                                     
class A {
  constructor(a: number) {}
}
 
class B {
  constructor(b: string) {}
}

interface ComponentConstructor<T> {
  new (...args: any[]): T
  id: number
}

function create<T>(objectClass: ComponentConstructor<T>) : T {
  return new objectClass()
}
 
const a = create(A)