1 00:00:02,510 --> 00:00:09,110 Now what do you do if you have a library where you can't install types as we did it for load Ash for 2 00:00:09,110 --> 00:00:11,270 example for a load Ash. 3 00:00:11,300 --> 00:00:18,410 Thankfully we had such a types package and as I mentioned for most third party libraries you have that 4 00:00:18,860 --> 00:00:26,660 but not necessarily for all or what if you have some other javascript code let's say in your index H 5 00:00:26,690 --> 00:00:36,340 html file you have some other script code which execute stare where you set some global variable global. 6 00:00:36,450 --> 00:00:40,380 This is set something like this where are you in the end. 7 00:00:40,380 --> 00:00:40,770 No. 8 00:00:40,770 --> 00:00:47,580 This will be a way lable globally as you know such variables added like this will be added to the global 9 00:00:47,580 --> 00:00:52,600 Window object and you want to utilize them from inside your types code. 10 00:00:52,710 --> 00:01:00,660 For example here if I want a console log global like this I get an error here in my idea and if I run 11 00:01:00,660 --> 00:01:09,900 TSC dash W to start copulation I also get an error here so it doesn't like that global thing even though 12 00:01:09,900 --> 00:01:15,670 we know that it will work because our next HMO file defines this global variable. 13 00:01:15,670 --> 00:01:22,180 And since we have defer on this script this script will be executed after this script down day Iran. 14 00:01:22,230 --> 00:01:28,740 In such cases you have no syntax a way lable in typescript and that is to declare command which you 15 00:01:28,740 --> 00:01:29,430 can use. 16 00:01:29,520 --> 00:01:37,260 You can declare certain variables for example to typescript you can say declare var global and tell 17 00:01:37,260 --> 00:01:42,070 typescript that for example this will be a string or that this is anything. 18 00:01:42,090 --> 00:01:50,540 This basically tells time don't worry it will exist it ever if we do is save this and I quit this compiler 19 00:01:50,540 --> 00:01:52,340 and use Web pig instead. 20 00:01:52,610 --> 00:01:59,070 We do see this output on our page because it's technically works and with declare war. 21 00:01:59,090 --> 00:02:02,190 We also tell typescript that does exists. 22 00:02:02,290 --> 00:02:04,330 Now I'm going to remove to stymie code here. 23 00:02:04,430 --> 00:02:08,860 But being aware of declare off does keyword of this command is important. 24 00:02:08,900 --> 00:02:15,650 It allows you to declare typescript features or variables where you know that they exist or let typescript 25 00:02:15,650 --> 00:02:21,680 know about packages global variables in general which types who can't know but where you as a developer 26 00:02:21,680 --> 00:02:23,440 know that they will be there.