I'm wondering what's the way to access a private static field within the same class assuming that class isn't exported.
module Test {
class Template {
private static ext = '.hbs';
private static basePath = 'WebContent/templates/';
private static templatesFolder = 'templates';
private static partialsFolder = 'partials';
private static paymentMethodsFolder = 'paymentMethods';
public static template(templateName, data): string{
return Handlebars.templates[Test.Template.basePath + this.templatesFolder + '/' + templateName + this.ext];
}
}
}
I don't know how to access to the static variables within the static template function. I don't want to export the class, because I want to encapsulate the logic so it's not usable from the browser.
What's the way to go here? I started with this because it wasn't static at first, but I changed my mind and I'm stuck now.