@@BigBahss so what? The mask mesh, that when you scale up the virus to one meter size leaves a few kilometer wide gaps to pass through, will protect them from a deadly infection with a killer virus, for which most people need a lab test to know they have it because they literally have no symptoms?
@@stopPlannedObsolescence Here is where all the creators of react and redux congregrate, and where you can find the best typescript info in the typescript room: discord.gg/eJDKVjYB. And here is the actually typescript community, but I think is less good and less active than the react one: discord.gg/quBBKPu8
const a = [1,2,3,4,5] as const type IndexOf = { [K in keyof T]: T[K] extends T[number] ? K : never }[number] type Test = IndexOf // "0" | "1" | "2" | "3" | "4"
I'd be happy to see a course on Advanced typescript from you. I am not kidding. [Dependent types] are the future for sure, you could reach masses! Please do it! :)
This should've probably been stated for everyone else but they're in the same room and were required to wear masks. Hope this helps anyone who was having headaches from trying to figure out why they'd wear masks inside and on an online chat.
Very interesting video. For the people that like to tinker const a = [1, 2, 3, 4, 5] as const const indexOfA: Exclude = "1"; This almost seems to work to but somehow the array entries are converted to strings 🤨
In FP if you want to iterate over a and b arrays at the same time it's common to use a zip operator, I guess it would make that strict rule happy 😉 BTW was wondering if "typeof b[number]" wouldn't be simpler than a recursion? In this case that seems overkill You can nest eslint configs in subfolders, but not sure it's possible with TS
Amazing video, learned a ton from that, thanks! Having one question though: am I right thinking true that `extends` keyword in generics behaves more or less like `===`?
That's because of your linter and probably this rule: github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/array-type.md I bet that they'd get the same error had they kept eslint enabled.
Typescript is Turing complete (I believe), so you should have all the basic program control functionality available to you. Pretty sweet, but, like the Goldblum character says in Jurassic Park: you could, but you didn't bother to ask if you should. I try to not get over my skis with this degree of cleverness. But...in a couple of years, who knows?
which typescript option I need to enable to support inline type setting, for example "const a = [1,2,3] as const;" ? I am always getting unexpected token error.
Soon we will be having opensource codebases written in TS which look like black magic. How are we supposed to be able to understand any of that? Isn't that an antipattern?
Hello, William! Can you share your way to fast typing and navigation in VS Code? Tried multiple times, but without success. I think think this video will be highly useful.
@@wcandillon I've seen this video, but I meant more about direct keystrokes typing. How you navigate between code and functions. I see you code and navigate very fast. Do you use Vim mode or whatever? Custom keybindings?
@@wcandillon Never Mind! Actually the issue was, I didn't understand the name of operator that was the exclamation mark in the end of variable. But I googled and got to know about it after few attempts. Non-Null Assertion Operator.
Can someone please tell me what theme and font they're using here? I would like to know so I can use it in my own editor, thanks!!! and how do they get the arrow to look like that?
It's a programming language that adds static typing to JS (like java/C++). Basically you write code in a language that's similar to JS, and your code is converted to JS by the TS Compiler.
Powerful, yes, but far from being easily grasp, sadly. This is like C++ templates. Not clear and easy enough to use so at the end, it won't be used that much. Let's hope they will work on that a bit more.
Nice video!!! I have a question, why I can't use array descontruction in this case stackoverflow.com/questions/59175342/typescript-type-assertion-for-union-of-tuples-how-to-assert-only-one-member I can't find a nice solution for this
what i can observe to really make sens is to compare how much it is useless to loose time for a type restriction in a non strict typed language at the end time than to wear mask in his room alone to chat online. it is crasy as "procrastination" the way you loose yourself in a non-sens own so virtual fucked world.
Guys, no need to wear those masks. I am sure your machines are protected by a proper antivirus
That's what I thought at first but it became clear that they're sitting across from each other, so.
also it considers everyone go with mask when outside
@@thongle3612
And that is just sick, you are brainwashed
They are in the same room
@@BigBahss so what? The mask mesh, that when you scale up the virus to one meter size leaves a few kilometer wide gaps to pass through, will protect them from a deadly infection with a killer virus, for which most people need a lab test to know they have it because they literally have no symptoms?
I really love this video format! Congrats both!
It's amazing to see people have fun, with something I struggle to do in my everyday life. Power to you guys.
skill issue
@@FlanPoirot absolutely
Typescript hidden capabilities are amazing. It's totally unique to typescript.
This is inspiring! I hope you guys keep creating these advanced TS videos.
I still remember when you weren't using typescript, now you're so good at it.
If possible, could you give us some articles or websites where we can learn more about these advance types? Thanks.
Go to the typescript discord
Search for “typescript type challenge”
That was amazing, where are these communities I can learn about Advanced TypeScript?
Same!
@@dmcdcm Check out his video from yesterday called "TypeScript Challenges"
Go to the typescript discord
@@SogMosee where :v
@@stopPlannedObsolescence Here is where all the creators of react and redux congregrate, and where you can find the best typescript info in the typescript room: discord.gg/eJDKVjYB. And here is the actually typescript community, but I think is less good and less active than the react one: discord.gg/quBBKPu8
const a = [1,2,3,4,5] as const
type IndexOf = {
[K in keyof T]: T[K] extends T[number] ? K : never
}[number]
type Test = IndexOf // "0" | "1" | "2" | "3" | "4"
will : what is the type of b ?
Jonny : is it 1 ?
will : WUT ?
This guy deserves more views
It reminds me of the cpp templating system. It's incredible what you can do at compile time.
Yess, the name of this is metaprogramming .. In the c++ metaprogramming it's more powerfull but c++ you dont able to do concatanation i guess 🤔
I'd be happy to see a course on Advanced typescript from you. I am not kidding. [Dependent types] are the future for sure, you could reach masses! Please do it! :)
It's all fancy and laughter until you have to debug this sh.t
This should've probably been stated for everyone else but they're in the same room and were required to wear masks. Hope this helps anyone who was having headaches from trying to figure out why they'd wear masks inside and on an online chat.
Lol
Anyway: Idiotslavemasks?! *INSANE!* ✊🏻 🙀 🇩🇪❤🇷🇺
very good video. looking forward to see future episodes
Subbed. This is so cool. I think you blew my mind a few times there 🧠🎆
Very interesting video. For the people that like to tinker
const a = [1, 2, 3, 4, 5] as const
const indexOfA: Exclude = "1";
This almost seems to work to but somehow the array entries are converted to strings 🤨
And I thought I knew TS
I think you will love also F# if you like typescript because they have some concept of type system.
That's very interesting you can do things like that with ts! It's is also incredibly unreadable and confusing! ;O
Absolutely great video
This is pretty cool, can't lie.
In FP if you want to iterate over a and b arrays at the same time it's common to use a zip operator, I guess it would make that strict rule happy 😉
BTW was wondering if "typeof b[number]" wouldn't be simpler than a recursion? In this case that seems overkill
You can nest eslint configs in subfolders, but not sure it's possible with TS
That would give the values of b and not the indices
Fantastic job mate 👌
Typescript is amazing 😍
More typescript videos please 🙏🏻
Amazing video, learned a ton from that, thanks! Having one question though: am I right thinking true that `extends` keyword in generics behaves more or less like `===`?
Yes
FYI the volume is really quiet in this video
i have to write IndexOf
That's because of your linter and probably this rule: github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/array-type.md
I bet that they'd get the same error had they kept eslint enabled.
@@DavidAguileraMoncusi thanks
Typescript is Turing complete (I believe), so you should have all the basic program control functionality available to you. Pretty sweet, but, like the Goldblum character says in Jurassic Park: you could, but you didn't bother to ask if you should. I try to not get over my skis with this degree of cleverness. But...in a couple of years, who knows?
it will be nice if make every week episode like this as tricky in the typescript
yes it's definitely coming :)
Nice video 🌹
This is so awesome.
What was the typescript challenges project that you mentioned?
you are showing it here: ua-cam.com/video/Ds0L0mQE96Y/v-deo.html
What is the TS puzzle website he was referring too???
it can just be `typeof a[number];`
Before watching: I know enough about TypeScript, let's see whats new...
After watching: I don't know anything about TypeScript.
I came faster than Bolt here
How dare you not wear two masks
does anyone know the name of the website for typescript puzzles he was talking about at 8:03
which typescript option I need to enable to support inline type setting, for example "const a = [1,2,3] as const;" ?
I am always getting unexpected token error.
afaik none. What TS version do you use?
@@thomasersosi4595 Typescript 4.0.3 with "react-scripts' 4.0.1.
Must be something with my config, as new CRA app is accepting this. :/
how come i get type instantiation is excessively deep and possibly infinite error? both on 4.1 and 3.9... thanks
You are here to read the comments about them wearing masks. Admit it.
Soon we will be having opensource codebases written in TS which look like black magic. How are we supposed to be able to understand any of that? Isn't that an antipattern?
yes it's an anti pattern and what we showed in this video shouldn't be used. We do hope that tuple support improves in the future.
WHAT IS THE ROADMAP FOR DIGGING INTO TYPESCRIPT!! ???
How are the editor animations (cursor position change, select text animation) so smooth? An extension?
Hello, William! Can you share your way to fast typing and navigation in VS Code?
Tried multiple times, but without success. I think think this video will be highly useful.
does this video help ua-cam.com/video/5ByuWilIMRg/v-deo.html ?
@@wcandillon I've seen this video, but I meant more about direct keystrokes typing. How you navigate between code and functions. I see you code and navigate very fast. Do you use Vim mode or whatever? Custom keybindings?
very nice video. learnt so much. i just struggle to hear you with the mask. would be 10x better unmasked imo
It's really hard to follow when all you use is a, b, c, Foo, bar.
It would be easier to use animals, fruits or something closer to real life
What is name of this color syntax?
TypeScript is basically coding for autocomplete, so TypeScript could have been a programming language for autocomplete.
I JavaScript, you just need to code and is keeping to work. Now i dont even need to test my code. I see outputs in my head.
Can anyone help with the link of puzzle site? thanks!
There was issue in sound many times, I was not getting what you have said few times
Sorry that was because of the masks, we should et this solved soon.
@@wcandillon Never Mind! Actually the issue was, I didn't understand the name of operator that was the exclamation mark in the end of variable. But I googled and got to know about it after few attempts. Non-Null Assertion Operator.
Does anybody know which website is he talking about at 8:03
This is so cool but so janky at the same time lol
Can someone please tell me what theme and font they're using here? I would like to know so I can use it in my own editor, thanks!!! and how do they get the arrow to look like that?
I was using Jonny's laptop so I'm not sure which theme is using, will ask
@@wcandillon Alright thanks for checking, looking forward to hear back.
What theme are you using for vscode?
Due ... forget the CH kbd... been typing blind for 10 years (set you kbd to us-en regardless of what the keys say 😉)
Perfect!
what is the vs code theme?
Noboby know? rs
what theme are you using ???
I found it, its called GitHub Theme, and there is Light and Dark version, he is using Dark obviously :D
11:44 why it can be 1? should be `2 | 3 | 4 | 5 | undefined`, right?
Because the hosts comment was misleading. When you do i+1 there you are making TS widen that type back to number.
Consider my mind blown!
This insane. I have to admit that I still don't understand.
Does it actually have any practical relevance?
At the moment no but hopefully in the future.
Ah there's a level of strictness that's not fun.
What's the difference between TS and JS?
Is TS another framework of JS?
It's a programming language that adds static typing to JS (like java/C++).
Basically you write code in a language that's similar to JS, and your code is converted to JS by the TS Compiler.
What is the colour theme you are using please?
I think it's "GitHub Dark"
ok. where can you use this knowledge in business?
I wouldn't say it's KISS compliant, so, you wouldn't...
Can I have your vscode theme settings?
that's a nice theme. What is it?
C#, Java and TypeScript started to be so complex due to 'types'.. I think it is the time to invent another way to type checking and tooling.
How do u get the effect that the indicator in VSCode is animated and moving around with a transition? Is that an extension?
Just open VSCode settings UI and search for "cursor". You should find all options you want there.
what vscode theme r u using?
Powerful, yes, but far from being easily grasp, sadly. This is like C++ templates. Not clear and easy enough to use so at the end, it won't be used that much. Let's hope they will work on that a bit more.
I couldn't agree more :)
Who are you gonna infect through UA-cam?
Safety is top priority, right? Next time wear two each. I feel a bit more safe that way.
witchcraft! 🤯
Nice video!!! I have a question, why I can't use array descontruction in this case stackoverflow.com/questions/59175342/typescript-type-assertion-for-union-of-tuples-how-to-assert-only-one-member
I can't find a nice solution for this
Uh you guys wear mask indoor?
Which theme are you using?
I found it, its called GitHub Theme, and there is Light and Dark version, he is using Dark obviously :D
what i can observe to really make sens is to compare how much it is useless to loose time for a type restriction in a non strict typed language at the end time than to wear mask in his room alone to chat online.
it is crasy as "procrastination" the way you loose yourself in a non-sens own so virtual fucked world.
Too much fun for me
what is this VS theme?
"Fun" haha
Thanks for the video
ultimately - whats the point?
exactly ☺️
Just don't do those things haha Still cool though, conditional types can be quite useful, specially with React.
quality went down because of the mask. sounds all muffed like a muffin.. maybe a face shield?
Hegel FTW
What font do u use in vs code ?
SF Mono (I think)
Gosh I miss Scala - none of these shenanigans needed for typed code you can actually rely on.
If you record this without a mask people might actually be able to watch it.
If only the mask wearing was ridiculous, but unfortunately it's more than that. They are also worse to understand this way.
🤯
more videos like this please, more typescript, more pair coding and discussion and take those bloody masks off...
🤯🤯
woooowww i didnt know you can disable eslint by doing that. thanks
Awesome content guys, and thanks for using masks, I fell safer
lmao felt safer ... if that's an honest assessment, you must be a silicon valley "engineer" who voted for Pelosi again.
@@neomonkeyking Maybe it was meant ironically. Hopefully.
Why are these guys both wearing facemasks? Do they really think it transmits over the internet?
Are you french? Cause i am