I BUILT a GAME in TypeScript TYPES!
16:47
Пікірлер
@hugodsa89
@hugodsa89 2 сағат бұрын
Dude that’s just XOR types
@c3cris2
@c3cris2 Күн бұрын
Someone please tell me what vscode extension he uses for the // ^?
@Typed-Rocks
@Typed-Rocks Күн бұрын
@@c3cris2 it‘s called twoslash queries 👍
@petacardi
@petacardi 2 күн бұрын
...and I thought the TypeTacToe was wizardry.
@petacardi
@petacardi 2 күн бұрын
The old "What Kind of Sorcery Is This?" meme was the first thing that came to my mind 🤯
@thejimmylin
@thejimmylin 3 күн бұрын
What is the nice // ^? feature from?
@Typed-Rocks
@Typed-Rocks 2 күн бұрын
It‘s called twoslash-queries and it‘s an extension for vscode 👍
@SuperDrKongo
@SuperDrKongo 5 күн бұрын
You can do wierd stuff with intrinsic types e.g. type SpecialChars = Lowercase<string> & Uppercase<string> function test(a: SpecialChars) { } test("0") // ok test("a") // not ok test("$$$") // ok
@Typed-Rocks
@Typed-Rocks 5 күн бұрын
That is really awesome 😁🤘
@mikuhl
@mikuhl 6 күн бұрын
It's interesting to realize that TypeScript is made with TypeScript, which is wild to wrap your head around, but many languages do this surprisingly!
@Typed-Rocks
@Typed-Rocks 5 күн бұрын
People even tried to do the compiler in other languages like rust but were not successful 😁
@ahmedsamir1601
@ahmedsamir1601 6 күн бұрын
Really Mind Blowing 🤯❤
@dimitargetsov9690
@dimitargetsov9690 7 күн бұрын
Great !!! Also, check how to pronounce "hereby".Channel like Yours , one of the BEST ON TYPESCRIPT , gotta be spotless. Full respect.
@Typed-Rocks
@Typed-Rocks 7 күн бұрын
Glad you enjoyed it :)
@antoniov845
@antoniov845 7 күн бұрын
👏 awesome
@BeeBeeEight
@BeeBeeEight 7 күн бұрын
I just watched a coding version of "any sufficiently advanced technology is indistinguishable from magic". Fiddle a file here and there, ding! "TypeScript" now has SnakeCase 😂😊
@Typed-Rocks
@Typed-Rocks 7 күн бұрын
Glad you liked it. An isn‘t coding always magic? 😁
@egorleineveber1668
@egorleineveber1668 8 күн бұрын
This is really awesome, bro! How did you learn all this? Do you sell any courses to learn TypeScript at that level?
@Typed-Rocks
@Typed-Rocks 7 күн бұрын
Thanks 🙏, I am just trying stuff and share my learning journey 😁. Currently I don‘t have any courses planned :)
@ATLAS_2002
@ATLAS_2002 8 күн бұрын
Definitely gonna try this sometime
@Typed-Rocks
@Typed-Rocks 8 күн бұрын
Looking forward to hear how it went
@stwebbox5691
@stwebbox5691 8 күн бұрын
Sure, I didn’t get it for what reasons it may be used by developers
@specy_
@specy_ 8 күн бұрын
Imagine if typescript allowed JavaScript to run at the type checking time so you can create your own inline intrinsic functions
@Typed-Rocks
@Typed-Rocks 8 күн бұрын
That would be interesting for sure 🧐. Maybe I will give it a try 😁
@specy_
@specy_ 8 күн бұрын
@@Typed-Rocks that would open up sooooooo many possibilities, you pretty much get comp time like rust/zig in the typescript codebase. You could even do runtime values by returning an object from the compilation step, and types from the checker. Imagine you have an ORM and want to create the typescript bindings to your local dB, you create a function that gets the schema from the DB and creates the correct types and a JSON definition of the schema. You get both compile time type checking and runtime, all directly in the typescript code. It would be incredibly cool. It probably was already considered but rejected, likely also for security issues
@karixening
@karixening 8 күн бұрын
This is next level TypeScript content, forking your own compiler 😂. You need to go in and add in all your "fixed types" next.
@Typed-Rocks
@Typed-Rocks 8 күн бұрын
I will do some videos in that direction 100% 😁
@CyanureNeko
@CyanureNeko 8 күн бұрын
Your channel name could not be better, this is witchcraft! lol
@Typed-Rocks
@Typed-Rocks 8 күн бұрын
Thanks 😁
@LeviSchuck
@LeviSchuck 8 күн бұрын
I am impressed with the consistent high quality of your content. Typescript type system has been very difficult to learn and your videos have really propelled me forward in making cool things. Thank you.
@Typed-Rocks
@Typed-Rocks 8 күн бұрын
Love to hear that 🙏
@D6Soldier
@D6Soldier 8 күн бұрын
All videos are way over my head, but I enjoy watching them and hope that at least some knowledge is being gained via osmosis :) My only minor gripe is that they move at such a fast pace that I always have to pause just to take stock of what is being said. Really enjoy this channel though, keep it up :)
@Typed-Rocks
@Typed-Rocks 8 күн бұрын
I know I sometimes talk too fast 😁 I will try to slow it down a little. Thanks that you enjoy them nonetheless 🙏
@deatho0ne587
@deatho0ne587 8 күн бұрын
Knowing TS has not gone to Rust yet, so nice.
@Typed-Rocks
@Typed-Rocks 8 күн бұрын
Absolutely 😁
@karixening
@karixening 8 күн бұрын
SWC and most recently OXC, but not the official compiler, true.
@BeeBeeEight
@BeeBeeEight 7 күн бұрын
Is there something bad about Rust compilers though, I thought Nextjs uses SWC?
@deatho0ne587
@deatho0ne587 7 күн бұрын
More of joking where everything seems to want to to Rust, which I am not sure is a good thing.
@karixening
@karixening 7 күн бұрын
@@BeeBeeEight that's right
@mateuszborkowski8930
@mateuszborkowski8930 8 күн бұрын
Really cool video! I think videos about types (generic ones) are the best ^^ You can tell about React.Dispatch<> as well :3
@mando-C137
@mando-C137 8 күн бұрын
Really cool!
@Typed-Rocks
@Typed-Rocks 8 күн бұрын
Thanks 🙏, glad you enjoyed it :)
@offroaders123
@offroaders123 8 күн бұрын
Outstanding, thank you! Been curious about this, but didn't want to go down the rabbit hole flying solo to figure it out haha.
@Typed-Rocks
@Typed-Rocks 8 күн бұрын
Thanks a lot. It is crazy how easy the TypeScript team makes it to build the compiler locally. I will surely make more videos regarding the compiler.
@battlestarapplewatch
@battlestarapplewatch 8 күн бұрын
Too tired to watch this after work on Friday, but I'm definitely going to check this video later!
@Typed-Rocks
@Typed-Rocks 8 күн бұрын
Looking forward to hear what you think. Enjoy your weekend 🤘
@DamjanBursac
@DamjanBursac 9 күн бұрын
Interesting. I understand if this video is meant to showcase a fun approach to implement game, but I would never encourage anyone to write code this way. It's both unreadable and unmaintainable. Actually, what is purpose of this video?
@Typed-Rocks
@Typed-Rocks 9 күн бұрын
Just 4 fun 🤘😁
@DamjanBursac
@DamjanBursac 9 күн бұрын
Hence, that's great 👏
@mateuszborkowski8930
@mateuszborkowski8930 15 күн бұрын
I can't wait for new videos! I am learning so much of generic in TS from you 🥺
@JustMeJustADude
@JustMeJustADude 15 күн бұрын
I like the ^? comment showing the evaluated type. How can i use this in Webstorm?
@JustMeJustADude
@JustMeJustADude 15 күн бұрын
i found it, its the Typescript Worksheet plugin, and there is a vid about it on the Typed Rocks channel. Couldn't get it to work with webstorm though. tsx failed to run the generated code
@Typed-Rocks
@Typed-Rocks 15 күн бұрын
It‘s a plugin called „witt“ i‘ve created. You can download it from the marketplace :)
@JustMeJustADude
@JustMeJustADude 9 күн бұрын
@@Typed-Rocks Bless you. I got it to work. However it doesn't fit my desired use case: I have a Prisma backend and i try to make everything typesafe by defining objects specifying what fields to include, for quite complex data types. Then i can pass this to a validator and receive a validated type. However its obscured with all kinds of Prisma helper types. The problem is that ^? only gives a small single line annotation and in my case cuts most of it off. Would it be possible to make such an inline annotation multiline? And nicely indented? I suspect not. Anyways great work, its a lovely plugin.
@ForAeonz
@ForAeonz 16 күн бұрын
This is crazy 🤯
@Typed-Rocks
@Typed-Rocks 16 күн бұрын
Stay tuned. There is more crazy stuff coming 😁
@LazyDeveloper-1
@LazyDeveloper-1 17 күн бұрын
That was a great video!
@Typed-Rocks
@Typed-Rocks 17 күн бұрын
Thanks 🙏. Really appreciate it
@anyadatzaklatszjutub
@anyadatzaklatszjutub 17 күн бұрын
This is so cool. This is the kind of conent I want to see and that noone else is doing in the space :) Congrats, man!
@Typed-Rocks
@Typed-Rocks 17 күн бұрын
Thanks man, really appreciate it :). Stay tuned for future videos :)
@gyorgykatona3613
@gyorgykatona3613 17 күн бұрын
After a 14 hour long workday, this video hurts 😅 great vid👍
@Typed-Rocks
@Typed-Rocks 17 күн бұрын
Thanks 😁
@МихаилАндросюк-ш7ц
@МихаилАндросюк-ш7ц 17 күн бұрын
Cool