import {TranslateService, LangChangeEvent} from "@ngx-translate/core";
class CustomLanguageExporter {
public currentLang : string;
constructor(private translate : TranslateService) {
}
public static setLanguage(): string {
this.translate
.onLangChange
.subscribe(lang => {
this.currentLang = lang;
})
return this.currentLang;
}
}
export let languageExport = CustomLanguageExporter.setLanguage(); //Error: Property 'setLanguage' does not exist on type 'typeof CustomLanguageExporter'.
Desired output console.log(let+"someValue");