How to use Typescript with libraries like Ampersand.js that parse configs to build prototypes
问题 My question is how to use libraries like AmpersandJS or other libraries that parse configs to build your (class) objects (I'm not sure if this pattern has a name) with Typescript. For example Ampersand.JS uses a function (.extend) to build up a prototype based on your configuration: // This object contains the configuration that Ampersand uses to build my model. var config = { props: { firstName: 'string', lastName: 'string' } }; // Create a Person model with getters, setters, validation etc.