These TypeScript Tricks are POWERFUL

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

КОМЕНТАРІ • 20

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

    Thanks for sharing this as it helps me wrap my head around working with keys and template literals in typescript. I'm good with intermediate to advanced difficulty stuff since beginner stuff is oversaturated.

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

    Cool, I recently started learning typescript more deeply. It helps a lot

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

    Can’t wait for your next video!

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

    Where can we find more challanges like that?

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

      Typehero.dev is great for them and free!

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

    Are you using a VSCode extension to show the type preview with the comment „// ^?“? 😊

    • @JollyCoding
      @JollyCoding  11 місяців тому +1

      Yep, it’s this one marketplace.visualstudio.com/items?itemName=Orta.vscode-twoslash-queries

  • @Deceris
    @Deceris 10 місяців тому +1

    Where is the power ? You have one type that you transform to an other type ok and then what ? Where do you use it in an actual code ?

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

    Hello the video was overall helpful . I request that in future you dumb it down more for beginners like me so that it's easily understandable.

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

      Teaching is a skill Im still learning and developing so will keep working on it! Cheers for the feedback.

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

    What are you supposed to do with this exactly? What is a use case?

    • @raellawrence7116
      @raellawrence7116 11 місяців тому +1

      I used something similar to create transient props for styled components
      /**
      * Represents a type where each key of an object is prefixed with `$`.
      * Useful for representing transient props in styled components.
      *
      */
      export type TransientProps = {
      [K in keyof T as `$${string & K}`]: T[K]
      }

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

      Interesting, thanks @@raellawrence7116

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

    Your VSCODE theme?

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

    i understood nothing but it looks really cool

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

      😂 it’s a bit of an advanced/intermediate tip but I am working in my teaching style too!

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

    Sweet

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

    You know your language is over-engineered and convoluted when you see something like
    [Property in keyof Type
    as
    'get${Capitalize

    • @mxz2024
      @mxz2024 11 місяців тому +1

      yea i thought so too. you can do a lot of stuff with typescript ..code gymnastics....but is it any useful in a rela life application? in 99% of all cases I would say no, because any other simpler solution will do the job and will be easier to maintain and to adjust. It is the same with rxjs operators..you can write a 50 lines rxjs pipe which does the same as a pipe with maybe 2 used rxjs operators...