TypeScript Basics 9 - Typing with functions

preview_player
Показать описание

Learn how to write typed functions in TypeScript. Declare types for function arguments and return types. Learn how TypeScript compiler enforces strict argument matching by default.

Course: TypeScript Basics
Learn about the basics of TypeScript. Understand how types work, how to use arrays and tuples, how to declare classes and interfaces. Understand concepts of type erasure, duck typing, enums, generics and modules. Create a development workflow and configure the TypeScript compiler to your needs. And watch as I build an end-to-end TypeScript application from scratch.
Рекомендации по теме
Комментарии
Автор

Good one! I would suggest using typescript syntax since we are writing code using typescript. I see that function argument and other places you are not mentioning the datatype.

amolsw
Автор

Hi koushik, awesome work so far. Please make one course javascript covering filter map and reduce.

gauravbajpai
Автор

Hello! I have been enjoying your videos. but a question real quick. isnt x=0 kinda dangerous if you do some mulitplication or division? in the case of addition/substraction is okay I guess but ? seems to be safer all the time.

ShamanRing
Автор

when function add(a, b, c?, d?){}
then, is it possible to pass a, b and d (without c), if yes, how?

PramitBiswas
Автор

I just get a Duplicate Function Execution even though there's just 1 function in my file. I've even tried keeping the name to not conflict any possible existing code.

priyesh_wngman
Автор

Thanks for the tutorial sir, but I am not able to get console.log message in my vs code terminal, I am using Windows, any specific configuration I need to do for that??

khairnarshekhar
Автор

How do you console log ? my console does not show any log.

themanthis