Relative Content

Tag Archive for javascripttypescripttypescript-genericstypescript-types.d.ts

Can I get the name of a TypeScript class or function at compile-time?

I’m trying to transform a JavaScript class which dynamically manages other classes for use in a web-based game engine into a TypeScript class for proper type checking (or, more accurately, write a .d.ts description of said class which follows its behavior). This class is called ScriptContainer, and allows one to dynamically add or remove scripts derived from the abstract ElementScript class, the details of which aren’t important for this post.