1 00:00:02,290 --> 00:00:04,930 With that we're almost done with the Corps types. 2 00:00:04,930 --> 00:00:08,110 There is one more type which we already saw and that's the. 3 00:00:08,110 --> 00:00:15,160 Any type the any type is the most flexible type you can assign and typescript this type doesn't tell 4 00:00:15,160 --> 00:00:16,730 typescript anything. 5 00:00:16,750 --> 00:00:19,980 It basically means you can store any kind of value in there. 6 00:00:20,020 --> 00:00:27,310 We got no specific type assignment typescript will basically never yell at you when you use any back 7 00:00:27,310 --> 00:00:33,340 in our code here if I would set the type of favorite activities to any would not get an error if I said 8 00:00:33,340 --> 00:00:34,650 it to any array. 9 00:00:34,780 --> 00:00:39,210 I at least tell typescript that favorite activities is an array of something. 10 00:00:39,280 --> 00:00:42,670 So if it would store just a single value in there I would get an error. 11 00:00:42,820 --> 00:00:47,210 But as long as it is an array I can store whatever I want in there. 12 00:00:47,200 --> 00:00:54,250 So any is really flexible and this can sound great at first but actually it's a big disadvantage and 13 00:00:54,250 --> 00:01:01,330 you absolutely want to a white any whenever possible because any takes away basically all advantages 14 00:01:01,330 --> 00:01:07,150 typescript gives you it gives you the same experience you have with vanilla javascript where you also 15 00:01:07,150 --> 00:01:14,350 have to any type on everything so to say any basically make sure that the typescript compiler can't 16 00:01:14,440 --> 00:01:22,720 check anything because if any property or any variable can store any value well then there's not much 17 00:01:22,720 --> 00:01:24,180 to check right. 18 00:01:24,250 --> 00:01:31,810 So you can use any as a fallback if you have some value some kind of data where you really can't know 19 00:01:31,810 --> 00:01:37,300 which kind of data will be stored in there and where you then maybe are using some runtime checks like 20 00:01:37,300 --> 00:01:43,720 we did here at runtime to narrow down what you want to do for certain values then you could go with 21 00:01:43,780 --> 00:01:44,410 any. 22 00:01:44,590 --> 00:01:51,290 But in other cases you really won a wide any if you have a chance of knowing which kind of data you're 23 00:01:51,310 --> 00:01:52,390 working with. 24 00:01:52,390 --> 00:01:54,000 Be explicit about it. 25 00:01:54,080 --> 00:02:00,670 Let us type scripts inference do its job or explicitly set your own types don't fall back to any if 26 00:02:00,670 --> 00:02:01,660 you don't need to.