Skip to content

Instantly share code, notes, and snippets.

@djcsdy
Created March 18, 2016 15:18
Show Gist options
  • Save djcsdy/c120c8c0b4c88b1bd461 to your computer and use it in GitHub Desktop.
Save djcsdy/c120c8c0b4c88b1bd461 to your computer and use it in GitHub Desktop.
class Base { }
class A extends Base { }
class B extends Base { }
interface Constructor<T> {
new(): T;
}
function doAThing(ctor: Constructor<Base>) {
let instance = new ctor();
}
doAThing(A);
doAThing(B);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment