These TypeScript Tricks are POWERFUL

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

Комментарии • 20

  • @MrBrandenS
    @MrBrandenS 10 месяцев назад +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 10 месяцев назад

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

  • @MinecraftWithTodd
    @MinecraftWithTodd 10 месяцев назад

    Can’t wait for your next video!

  • @gatogordo4131
    @gatogordo4131 10 месяцев назад

    Where can we find more challanges like that?

    • @JollyCoding
      @JollyCoding  10 месяцев назад

      Typehero.dev is great for them and free!

  • @cedericprivat
    @cedericprivat 10 месяцев назад

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

    • @JollyCoding
      @JollyCoding  10 месяцев назад +1

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

  • @ry902
    @ry902 10 месяцев назад +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  10 месяцев назад +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 10 месяцев назад

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

    • @raellawrence7116
      @raellawrence7116 10 месяцев назад +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 10 месяцев назад

      Interesting, thanks @@raellawrence7116

  • @progressivenetwork3584
    @progressivenetwork3584 6 месяцев назад

    Sweet

  • @pettymanny6487
    @pettymanny6487 10 месяцев назад

    i understood nothing but it looks really cool

    • @JollyCoding
      @JollyCoding  10 месяцев назад

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

  • @Deceris
    @Deceris 8 месяцев назад +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 ?

  • @kaustav07
    @kaustav07 10 месяцев назад

    Your VSCODE theme?

  • @___jd
    @___jd 10 месяцев назад +2

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

    • @mxz2024
      @mxz2024 10 месяцев назад +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...