As a newcomer to Typescript, I am currently exploring the option of integrating it into my current project.
In our MVC project, we have a single file that houses the definitions of all model objects. This file is downloaded to the client when the user first visits the page. If the user clicks on a button for a specific feature, only the relevant View/UI files are downloaded on demand to enhance responsiveness.
I have successfully converted all my model objects to Typescript objects and generated an output file similar to the existing one. Now, I am faced with the task of creating view files that contain only the logic related to views. However, when I import model objects in these view files, it also includes the definition of the model objects in the output js file, which in turn increases the file size.
My question is: Is there a way to reference model objects in view files without importing them since the model file is already downloaded to the client before the view files?