In my project, I have a TypeScript file called 'abc.ts' which includes a method named 'ScanCode()'. Additionally, I have a separate JavaScript file named "sample.js" with a method titled foo(). My goal is to invoke the ScanCode method from the TypeScript file within the foo method of the sample.js file.
I attempted to import the TypeScript file into JavaScript, however, it seems that the 'import' function is not recognized.