#15: Call Signatures in TypeScript with Real-life Examples & Best Practices 🧑‍💻

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 41

  • @ThapaTechnical
    @ThapaTechnical  Рік тому

    Homework🔥🔥 Watch this video and let me know why I used the call signature 👉 ua-cam.com/video/N_fm1B0k5k0/v-deo.html

    • @callmeghostgamer
      @callmeghostgamer 11 місяців тому

      bhai ye extension ki wajah se kuch nahi samjha ushpe v type Student k andar agar greet method call signature ka return type agar void kardo and student1 k andar greet ka return type string kardo firv koi fark nahi paad raha. this's not justified.

  • @RajCreationAA
    @RajCreationAA 8 місяців тому

    Best typescript video on UA-cam ✨

  • @akashverma429
    @akashverma429 Рік тому

    what a awesome content. sir u r my teacher,mentor....i literally respect u very much..ur videos help me a lot..thanks sir for sharing such great content with us.😍✌👌👌🙌🙏🙏

  • @hemantvishwakarma8751
    @hemantvishwakarma8751 8 місяців тому +2

    // #1. Function call signature: refers to the declaration of a function, which
    // includes the function's name, parameters, and return type.
    // it defines the structure and the type information of a function without including function's body
    // *** call signture are typically used inside the object type notation to describe the shape of the function
    // without object types
    type Student = {
    name: string;
    age: number;
    greeting: (country: string) => string; //method call signature
    }
    const introduction = (student1: Student): string => {
    return `Hello,${student1.name}. Your age is ${student1.age}`;
    }
    const student1:Student = {
    name: "Ram",
    age: 18,
    greeting:(country:string):string => `Hello, my name is ${student1.name}, my age is ${student1.age}. I am from ${country}`
    }
    // console.log(introduction(student1));
    console.log(student1.greeting("Bharat"));

  • @nontechbg
    @nontechbg 8 місяців тому +1

    In simple words call signatures means function type declaration like we declare variable type 👍

  • @gg.gyroguru
    @gg.gyroguru Рік тому

    thankyou Thapa Sir, apke react ka video dekh kr newsapi fatch krne website bnaya hu

  • @Mayank_Bisht_MB
    @Mayank_Bisht_MB Рік тому +2

    ye ...data kya hai. kahi define to kara hi nahi hai ise

  • @AmnaRashid-z9s
    @AmnaRashid-z9s 6 місяців тому

    Assalamualaikum @thapatechnical sir your typescript series is so helpful but I want to ask you that why did you use spread operators in line 34 and 35 ??kindly explain it. Thanks

  • @neerajagrawal709
    @neerajagrawal709 5 місяців тому

    Hello sir, Thank you for your typescript tutorial, you wrote ...data in console log, can you please explain what is this and why you write?

  • @azampasha6020
    @azampasha6020 5 місяців тому

    Good One!.

  • @jonnysharan4393
    @jonnysharan4393 Рік тому

    first type and then object and then call this cis callsignature you could also add call signature which is pure in type is only (country:string):string . Now it's up to me what do i need to use waht i choose

  • @podmixglobal
    @podmixglobal Рік тому +1

    which extension you are using ? its types changes automatic

  • @yourbrave189
    @yourbrave189 Рік тому

    Great Tutorial

  • @websitedeveloper2003
    @websitedeveloper2003 Рік тому +1

    Sir ...data nahi aa raha aur agar type kare to bol raha hai can not find name data .

  • @nikita8955
    @nikita8955 Рік тому

    Waiting for angular series❤❤

  • @maddeveloper6276
    @maddeveloper6276 Рік тому

    awsome🥰🥰🥰🥰🥰

  • @fadedmemes
    @fadedmemes 9 місяців тому

    Extension name? Plz

  • @rishabh92111
    @rishabh92111 Рік тому

    NICE VIDEO 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

  • @RajVishwakarma-cf5jm
    @RajVishwakarma-cf5jm Рік тому

    Web vitals pr video bnao thapa ji😁

  • @jonnysharan4393
    @jonnysharan4393 Рік тому

    ok it definition in object greet: (country):string=>{} and after that use like student.greet(country:"India")

  • @shivamsoni7974
    @shivamsoni7974 Рік тому

    nice video

  • @jonnysharan4393
    @jonnysharan4393 Рік тому

    Call signature is used to define the type of the method of object it is like greet: (country:string)=>string and the use in object student{greet:(country:string):string=>" jkahahaj "}

  • @muhammadusmanali1838
    @muhammadusmanali1838 11 місяців тому

    Good!

  • @rishiraj2548
    @rishiraj2548 Рік тому +1

    Good day greetings

  • @Radhe_radhe2929
    @Radhe_radhe2929 Рік тому

    Op❤❤❤

  • @jonnysharan4393
    @jonnysharan4393 Рік тому

    greet(Country:"India")

  • @pankajsharma-rf1ov
    @pankajsharma-rf1ov 7 місяців тому +1

    To much complicated due to the extention

  • @sumitgoyal385
    @sumitgoyal385 Рік тому

    ruk jao bhai thoda dhire dhire Javascript finish karke aauga idhar

  • @sagarmehta225
    @sagarmehta225 Рік тому +2

    is extension ne padne ka sara maja kharab kr diya

    • @avijitchowdhury3817
      @avijitchowdhury3817 Рік тому

      Exactly bro, kuch samaj main hi nehi aya!!

    • @nishantmoolya
      @nishantmoolya 9 місяців тому

      What is the name of that extension, I am not getting it

  • @nontechbg
    @nontechbg Рік тому

    Nahi samaj aaya 😢. ...data kaha se aaya ?

    • @nontechbg
      @nontechbg 8 місяців тому

      Ab samaj aa gaya 😂 d/5/5/2024

    • @jaggudon3518
      @jaggudon3518 5 місяців тому

      @@nontechbg mujhe bhi smjha bhai, kya h yeh

  • @jagdishjena9058
    @jagdishjena9058 Рік тому

    ⒯⒣⒜⒩⒦ ⒴⒪⒰ ⒮⒪ ⒨⒰⒞⒣ ⒮⒤⒭ 😚😚😚😚😚😚