I have a file called general.js. In the file is a function
function fadeDivWrite(pString) {};
The typescript file is called Default.ts. I'm trying to call the fadeDivWrite function from general.js but it's not working. What i'm trying to use in the Default.ts file is
var pText: string = "Test";
declare function fadeDivWrite(pText): string;
The ts file won't compile with an red line under the declare. The error is (TS) Modifiers cannot appear here.
This is how I've seen it done in multipal places when doing searches so I'm missing something. Hoping someone can help out.
thanks shannon
declaregoes in the declaration file general.d.ts. Useimport * as general from './path/to/general'. Call the method asgeneral.fadeDivWrite()in your ts file.