Typescript Call Static Method Dynamically Allocate C