TypeScript Generators, Iterators & Iterables

Поделиться
HTML-код
  • Опубликовано: 23 авг 2024
  • A generator function returns a lazy iterator, which generates data only on demand. In the following tutorial, Benny will show you how to code your own generators. You will also learn the difference between iterators and iterables. typescript.tv/...
    My FREE programming apps:
    - apps.apple.com...
    - play.google.co...
    My FREE TypeScript Course:
    - typescript.tv/
    Timelime:
    01:15 - How to write a generator function?
    03:28 - What is a generator object?
    04:48 - What is an iterator?
    06:31 - What is an iterable?
    07:10 - The `Symbol.iterator` property
    09:32 - What is an iterable iterator?
    10:18 - Benefits of using iterators
    12:54 - Iterator pitfalls
    14:10 - Spreading iterables to an array
    14:48 - Pause and resume with `yield`
    16:53 - TypeScript compiler configuration
    Follow Us:
    🌐 typescript.tv/​
    🐦 / typescripttv
    📺 / typescripttv​
    Hashtags:
    #TypeScript #Programming #WebDev #TypeScriptTV

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

  • @TypeScriptTV
    @TypeScriptTV  Месяц назад

    Need a practical example of generators? Check this out: ruclips.net/video/DwRS6f-UzaA/видео.html

  • @martinemanuel8239
    @martinemanuel8239 2 года назад +1

    I think this is most interesting video that I can find in youtube, amazing !

    • @TypeScriptTV
      @TypeScriptTV  2 года назад +1

      That's a big appreciation. Thanks a lot!! Best, Benny 😊😊 P.S. Here is a list of 100+ TypeScript errors and how to fix them: typescript.tv/errors/

  • @nhatkytran3449
    @nhatkytran3449 Месяц назад

    Thanks bro! Keep up the good work.

    • @TypeScriptTV
      @TypeScriptTV  Месяц назад

      Thank you, I will! I also wrote a follow-up tutorial: typescript.tv/hands-on/use-typescript-generators-for-cleaner-programming/

  • @peterferencz
    @peterferencz 2 года назад +1

    Good explanation, thank you

    • @TypeScriptTV
      @TypeScriptTV  2 года назад +1

      You are welcome! I am currently publishing a new video every Monday. Upcoming topics are "Generics" and "Functional Programming with TypeScript". Best, Benny

  • @Justin-or5vc
    @Justin-or5vc 3 года назад +2

    Epic, thanks!

    • @TypeScriptTV
      @TypeScriptTV  3 года назад

      Happy to help! 😊 Are there any other TypeScript topics you'd like to know more about? Best, Benny

  • @lorenzo7742
    @lorenzo7742 2 года назад +1

    Thanks, very useful video!

    • @TypeScriptTV
      @TypeScriptTV  Год назад

      Happy to help! I also have a full playlist for Generics if you are interested: ruclips.net/video/RHah57-vv-E/видео.html

  • @AlouiMohamedhabib
    @AlouiMohamedhabib 2 года назад +1

    Thank you.