Restore typescript code from android platform

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 ?

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

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

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.

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

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

2 Likes

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!