After researching countless similar inquiries on this topic, I have come to the realization that most of the answers available are outdated or rely on discontinued NPM packages. Additionally, many solutions are based on packages with unresolved bug reports dating back two years.
Despite the challenges, I am willing to explore any task runner, package, or import format to achieve my goal.
My aim is to write TypeScript code that resembles the following:
File1:
import FileTwoClass from "./File2"
export default FileOneClass{
fieldOne:number = 12
doStuff(){
FileTwoClass.importantFunction(this.fieldOne)
}
}
File: App.ts:
import FileOneClass from "./File1"
class App{
run(){
FileOneClass.doStuff();
}
}
let app = new App()
app.run();
Ultimately, I am seeking a solution that will consolidate all dependencies from linked TypeScript files into a single file.
Is my approach flawed, or is this objective achievable? If so, what is the best way to accomplish it? :D
Thank you!