In one file, I have the following code snippet:
export module Utils {
export enum DataSources {
SharepointList = "SharepointList",
JsonData = "JsonData"
};
}
And in another file, there is the following code:
import CustomerDAO from "./ICustomerDAO";
import SharepointListDAOFactory from "./SharepointListDAOFactory";
import JsonDAOFactory from "./JsonDAOFactory";
import {Utils} from "./DatasourcesEnum";
export default abstract class DAOFactory{
public static SHAREPOINTLIST: number = 1;
public static REMOTEJSON : number = 2;
public abstract getCustomerDAO(): CustomerDAO;
public static getDAOFactory(whichFactory: Utils.DataSources): DAOFactory {
switch (whichFactory) {
case whichFactory.SharepointList:
return new SharepointListDAOFactory();
case whichFactory.JsonData:
return new JsonDAOFactory();
default :
return null;
}
}
}
Unfortunately, these errors are appearing:
Property 'SharepointList' does not exist on type 'DataSources'.