I have an existing Javascript file named app.min.js which comes with a website template. This file defines a function called pageSetUp that needs to be invoked when the DOM is loaded.
I have created a TypeScript definition file named app.d.ts which the following content:
interface App {
pageSetUp();
}
It is referenced in the TypeScript file as follows:
/// <reference path="../typings/app.d.ts"/>
However, when add the following line to the constructor of this class like this:
module ViewModel {
export class TableViewModel {
constructor() {
pageSetUp();
}
}
}
The build fails with error: "Could not find symbol 'pageSetUp'.
What am I missing?
TIA.