🚀 For Source Code & Home Assignment 👉 thapatechnical.shop/courses/typescript-crash-course
@omrout3957
Жыл бұрын
Sir I pay for react js source code ₹50 rs but I didn't get source code
@DEEPANSHU_NAG
Жыл бұрын
Assessment: function add(a:T,b:T):T ; function add(a:T ,b:T):T ; function add(a:any,b:any):any { return a+b; } const result1 = add(5,10); const result2 = add("Hello ","World!");
@user-om7nc5bt4e
2 ай бұрын
function add(a:T, b:T):T{ return a + b as T } generics does not + so we need to define a subtype of T which extends number here .. thus T is a subtype of number
@CHETANRATHOD-eq1bx
Жыл бұрын
TypeScript doesn't allow the + operator on generic types with a union constraint. To handle addition for generic types that can support the + operator, you can use function overloading.
day-19- your explanation is aswesome like your videos
@yash-eb9zu
Жыл бұрын
Bhaiya mern stack application ko azure par host kaise karna uska video please
@parasbhardwaj9061
4 ай бұрын
function add(a: T, b: T): T { if (typeof a === 'number' && typeof b === 'number') { return a + b as T; // Use 'as T' to assert the return type } else if (typeof a === 'string' && typeof b === 'string') { return (a + b) as T; // Use 'as T' to assert the return type } else { throw new Error('Unsupported types for addition'); } } const result1 = add(5, 10); const result2 = add("Hello", "world!");
@paraspandri7283
Жыл бұрын
Thanks sir ❤❤
@kuldeepsinghrathore2327
11 ай бұрын
It gives me error can any to know how to solve it function addFun(a:T, b:T):T{ return a+b } console.log(addFun(45, 62)) error:Operator '+' cannot be applied to types 'T' and 'T'.
@akashkaushik8684
6 ай бұрын
bro i got same error, have you solved ??
@ishikamalik4183
7 ай бұрын
source is not in your website for type script kindly share link for source code
@satyam_code
Ай бұрын
💚💜🧡
@richasharma7468
4 ай бұрын
where can i find source code
@subhomoypal7982
Жыл бұрын
Sir It's gives an error how can I take multiple parameters using generics.
@kuldeepsinghrathore2327
11 ай бұрын
yes same here it give me error , here is my code function addFun(a:T, b:T):T{ return a+b } console.log(addFun(45, 62)) error:Operator '+' cannot be applied to types 'T' and 'T'.
@omrout3957
Жыл бұрын
Sir I pay for source code ₹50 rs but I didn't get source code
@Daily_dose_motivation29
Жыл бұрын
Op ❤❤😊
@ayush_code9849
Жыл бұрын
🔥
@jagdishjena9058
11 ай бұрын
ᴛʜᴀɴᴋ ʏᴏᴜ ꜱᴏ ᴍᴜᴄʜ ꜱɪʀ.
@soumyaprakash1526
8 ай бұрын
Only one example is not enough. It’s a single example. It won’t work
@shamsundar1675
8 ай бұрын
Exactly, I also had to watch out other youtuber's videos to understand it properly.
@shamsundar1675
8 ай бұрын
I would says its not a detailed explaination. It looks like you just wanna create this video just for the sake of quantity not quality.
@ppp5921
6 ай бұрын
your vdo hide many code ! that not gd to see
@rishiraj2548
Жыл бұрын
👍🙏
@shivamsoni7974
Жыл бұрын
1 doubt session lelo Thapa Bhaiya Bahut doubt aa rahe hai mujhe
Пікірлер: 33