Restore typescript code from android platform


#1

I’m using ionic-v2 , I lost a typescript file from my project but i still have the android code .How can i get the typescript files ? Anyone have any idea ?


#2

If you have the apk file you can use something like 7-zip to extract its contents

If it’s bundled however you would only have the javascript


#3

You will only get the Javascript file from the apk, not the Typescript.


#4

Unfortunately there is no way to get the TS file back from this. Depending on how you built, you might look at the JS code and then rebuild it manually - just look inside the JS files in what you have.

Please use a version control system in the future. Using git locally is almost not work at all and Bitbucket offers free private repos.


#5

:confounded: I’ll try ! Thanks for the advice .


#6

I found my code inside main.js ! thanks for the help :grin:.


#7

I feel like hugging you brother!
Notepad++ filled my .ts file “NULL” texts all over.

The only way I could recover my code was from main.js file.

Thank you so much!