TypeScript Mock Interview | Interview Questions for TypeScript Developers

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

КОМЕНТАРІ •

  • @ironside915
    @ironside915 Рік тому +62

    2:17 What is Typescript?
    3:50 Components of Typescript (pretty much the same as first question)
    5:35 Why should we use Typescript
    7:11 Access Modifiers
    8:23 What type did Typescript add to Javascript?
    9:33 Difference between interface and type?
    10:57 Generic types
    12:03 Structural Typing
    13:22 Private fields rules
    14:24 Never vs unknown vs any
    17:31 Declare keyword
    18:52 What are ambients? (unanswered)

  • @asadanik5987
    @asadanik5987 Рік тому +20

    Ambient declarations are typically used to describe the shape of libraries that are written in JavaScript, so that you can use them in your TypeScript code with type checking and IDE support. They are defined in .d.ts files, which are TypeScript declaration files that contain only type information and no actual implementation code.

  • @julianosanm
    @julianosanm Рік тому +3

    Always nice to see a fellow BR speaking English so well. 💪

  • @dubble_cuppachino
    @dubble_cuppachino Рік тому +38

    10:46 types cannot be extended, but they can be intersected to create new types. This should be mentioned when asked how types are different than interfaces.

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

      You mean aggregating various types to create another type in the case of interface?

  • @NeniEmSu
    @NeniEmSu Рік тому +7

    Any allows you to perform any operation on a value without any type checking, whereas unknown requires you to perform type checking before performing any operations on the value.
    The 'never' keyword to make a variable of never type. Users can use the never type when they are sure about any situation that will never occur. For example, we can use the never as a return type when we are sure that the function will never return any value.

  • @MdMostafizurRahman-xv3qw
    @MdMostafizurRahman-xv3qw 2 роки тому +10

    An ambient declaration is a way to tell the TypeScript compiler about the existence of a value that is not written in TypeScript, such as a global variable or a third-party library.

  • @licokr
    @licokr Рік тому +9

    The intervieww has a very good knowledge of typescript. I was able to learn a lot from the video. Thank you for sharing the great video :)

  • @webdevbyte
    @webdevbyte 20 днів тому

    16:00
    when using the any type, you can freely assign and reassign values of different types without TypeScript raising type errors.
    When you assign a type never, you cannot reassign it to any other type, including an object.

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

    Thank you so much to Turning bros! Please publish many many videos like this. It's pretty helpful for everyone there, including me.

  • @majd36637
    @majd36637 Рік тому +4

    Ambient declarations in TypeScript allow you to provide type information for external libraries, global variables, or other non-TypeScript code.
    To use ambient declarations, you create `.d.ts` files where you define the ambient types. These declaration files should be included in your TypeScript project so that the compiler can recognize and apply the type information.
    Overall, ambient declarations in TypeScript enable better type-checking and tooling support in projects that involve external entities.

    • @ann_lu
      @ann_lu 2 місяці тому

      I would say no need to create it, just to set up declararion: true in tsconfig and it will be generated automatically from .ts files with types

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

    Very Informative!!

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

    can extends but it is not extends, it call Intersection. so it is not wrong if we say type can't extend.

  • @devuthakkar1602
    @devuthakkar1602 2 роки тому +2

    Very well done.👍

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

    Awesome. Turing 🥰🥰🥰🥰

  • @yashwanthreddygowreddigari1997

    Awesome.. Thank you so much it is very Usefull

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

    Useful video

  • @Mr.Zeus11
    @Mr.Zeus11 6 місяців тому

    good one!

  • @4w0ken
    @4w0ken 3 місяці тому +1

    oh man i would crush these interviews

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

    Hey buddy what kind of question is that “ u like typescript or not “ seriously is it concern with Candidate who is giving interview

  • @devendrayadav2534
    @devendrayadav2534 3 місяці тому

    `any` is funny, you can resassign `string | number | boolean` anything lol. Purpose of typescript defeated with single keyword.

  • @LoveQwertying
    @LoveQwertying 7 місяців тому

    he/him/his :D