import { Observable } from 'rxjs/Observable' ; import { Service } from 'typedi' ; import { SETTINGS } from './settings' ; import { FirebaseAppConfig } from 'angularfire2' ; export interface ISetting { readonly host : string ; readonly og : { readonly title : string ; readonly description : string ; readonly image : string ; readonly type : string ; readonly locale : string ; } ; readonly assets : { readonly userAvatarImage : string ; } ; readonly tokens : { readonly facebookAppId : string ; } ; readonly injections : ReadonlyArray < Injectable > ; readonly i18n : { readonly [ key ] : any ; } ; readonly firebase : { readonly appName : string ; readonly config : FirebaseAppConfig ; } ; } export interface Injectable { readonly inHead : boolean ; readonly element : string ; readonly value ? : string ; readonly attributes ? : { readonly [ key ] : string | boolean ; } ; } export interface ISettingRepository { getDictionary ( ) : Observable < ISetting > ; } @ Service ( ) export class SettingRepository implements ISettingRepository { private readonly db = SETTINGS ; getDictionary ( ) { return Observable . of ( this . db ) ; } }