I have this code and want to access a class method outside the class in AssetsMap array.
import OrientationEnum from "../enums/orientation_enum";
import * as gameconfig from "../gameconfig";
import GA from "./analytics";
import * as Raven from "raven-js";
import {getQueryString} from "./tools";
const AssetsMap = new Map([
[AssetsEnum.background, 'common/background.jpg']
]);
class AssetsManager {
constructor...
getConfigValue(key, defaultValue) { ... }
}
if I try to access getConfigValue method inside map array somethings like this
[AssetsEnum.background, 'common/background'+this.getConfigValue()+'.jpg']
the console throws error that getConfigValue is not defined. How should I access the method?
AssetsMapinside constructor?