Why does this compile cleanly in TypeScript, but crash when called with no arguements? Go!
11 405
27.7
Google Developers2.6 млн
Следующее
Популярные
Опубликовано 6 октября 2025, 13:01
Here’s a TypeScript developer challenge that shows how optional parameters can get tricky. TypeScript accepts the code without errors. But the moment you call the function with no arguments, it blows up at runtime. Why does this compile cleanly, and what change would you make so the bug is caught during type checking instead of in production? Share your solution in the comments.
Subscribe to Google for Developers → goo.gle/developers
Speakers: Meg Bauman
Subscribe to Google for Developers → goo.gle/developers
Speakers: Meg Bauman
Свежие видео
Случайные видео
Experience Classical Music in Mixed Reality – Playing with Fire: An Immersive Odyssey with Yuja Wang





















