Automatically adds typescript references to the top of the file by analyzing import statements