I am facing an issue with two classes in separate files, where one extends from the other. The base class contains some import statements for node modules. I am confused as to why the derived class (located in a different file) is not recognizing the base class!
Could someone provide clarity on this matter?
// UtilBase.ts
/// <reference path="../typings/node.d.ts" />
/// <reference path="../typings/packages.d.ts" />
import * as path from "path"; // <---- THIS LINE BREAKS THE BUILD!!!!
namespace My.utils {
export class UtilBase {
protected fixPath(value: string): string {
return value.replace('/', path.sep);
}
}
}
Also,
// UtilOne.ts
/// <reference path="UtilBase.ts" />
namespace My.utils {
export class UtilOne extends My.utils.UtilBase {
}
}
Upon compilation, I encounter the following error:
src/UtilOne.ts(6,47): error TS2339: Property 'UtilBase' does not
exist on type 'typeof utils'