import { Injectable } from '@angular/core' ; import { User } from '../../models/User' ; import { Question } from '../../models/Question' ; import { Answer } from '../../models/Answer' ; export interface Models { [ name ] : any ; } @ Injectable ( ) export class SDKModels { private models : Models = { User : User , Question : Question , Answer : Answer , } ; public get ( modelName ) { return this . models [ modelName ] ; } public getAll ( ) { return this . models ; } public getModelNames ( ) { return Object . keys ( this . models ) ; } }