Now this is it for this module.
Obviously modern JavaScript has a couple of other neat features as well.
For example I'll cover classes in the class module and in general this is no javascript course.
I don't want to bore you with tons of JavaScript knowledge that doesn't really relate to typescript.
I wanted to mention these specific features because it's good to know that typescript helps us use these
features in a way that still runs in older browsers because that is something which you must never forget.
Your code gets compiled.
Currently I have to target set to iOS 6 and therefore if we check the dist folder we see constants on
are all available in the app j ust file as well.
Object restructuring also is a way of like this stair because all these features are supported in iOS
6.
If it would set the target to is 5 and a comment out lip now so that the correct lips are imported for
the years 5 target which will happen by default you will see that the generated code now looks quite
different.
It's way longer because now we're using var and typescript had to find work arounds for certain sudden
taxes that are not supported in EA's 5 javascript for example that the structuring syntax was removed.
So that's an important thing to always keep in mind.
Typescript compiles your code not just from typescript only features to regular javascript but also
from modern javascript to old javascript.
If you tell typescript to do so.