Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public create(className: string, ...options): any {
- if (!this.registeredTypes.hasOwnProperty(className)) {
- console.error("!!!");
- return null;
- }
- let classDefinition = this.registeredTypes[className];
- let instance = new classDefinition(...options);
- return instance;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement