The TS Playground has PLUGINS

Поділитися
Вставка
  • Опубліковано 19 кві 2023
  • I've been using the TypeScript playground wrong all this time. These plugins are SO useful and improve my dev life so much, given how much time I spend on the TS playground helping people.
    Playground: www.typescriptlang.org/play
    Become a TypeScript Wizard with my free beginners TypeScript Course:
    www.totaltypescript.com/tutor...
    Follow Matt on Twitter
    / mattpocockuk
    Join the Discord:
    mattpocock.com/discord

КОМЕНТАРІ • 34

  • @2mbst1
    @2mbst1 Рік тому +9

    The vim plugin was the first one I turned on when I found out about plugins. Didn't know it could do imports! That's a game changer!

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

    Thanks Matt! I saw the plugins tab but had no idea what it really did--having prettier is a game changer!

  • @iamjo
    @iamjo Рік тому +12

    Damn! I knew plugins but I didn't know you could import other packages 🤦‍♂️🤦‍♂️🤦‍♂️

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

    Love these bite sized nuggets of useful info!

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

    I remember asking for help in your discord and sending a codebox link lmao, I didn't know about typescript playground until then, thanks Matt!

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

    Thanks again Matt!

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

    Wow. Everyday something new.Thanks!

  • @Guergeiro
    @Guergeiro Рік тому +13

    Vim is something for me... Normally I copy and paste from my Vim into TS Playground. This unlocks my speed.

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

    I like this short format

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

    hmm first time even hearing about TS playground! I'll check this out thanks!!

  • @coder_one
    @coder_one 4 місяці тому

    @Matt How did you configure playground to be able to import external libraries like "zod"? I tried, but such code does not compile.... "Cannot use import statement outside a module"

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

    Hi Matt. I love your channel!
    Quick question: how do i create an object implementing an interface, but to type it as object literal as usual with `as const`? I can think of one solution using generics for each property which is to dirty.

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

      const myObj = {} as const satisfies MyInterface

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

      @@mattpocockuk that is exactly what i needed and couldn't find. Thank you!!

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

    I feel like I was using discord in light mode, how long they had that?

  • @artu-hnrq
    @artu-hnrq Рік тому

    Nice tip

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

    :)) youre way too funny and excited

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

    Hi guys. I am using Mac and when i want to check a list of possible values based on my types, using CMD + space doesn't work. Does anyone know how to get a list of possible values ( autosuggestion ) in TS playground ?

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

    I really missed vim motions

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

    Oh my god. I feel so incredibly dumb today 🤯
    All of these are stuff I used to be annoyed that the TS playground didn't have.

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

    I wish the imports worked consistently. Half the time they don't resolve and there's no retry button anywhere either :\

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

    Plugin Baby

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

    Can't make import work. Anyone else?

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

    THICC SCRIPT

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

    I hate Prettier. But links shortening seems to be very useful.

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

    i use all editors on crap mode, but that might just be me?

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

    Say whaaat now?

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

    Hello Matt can you help me?
    interface IListItem {
    stt: number;
    name: string;
    }
    const list: IListItem[] = [
    {
    stt: 1,
    name: "name1",
    },
    ];
    function getKey(items: T[], key: K): T[K][] {
    return items.map((item) => item[key]);
    }
    console.log("««««« keyList »»»»»", getKey(list, "invalid"));
    When i use interface here type script throw me errors :
    " Argument of type '"invalid"' is not assignable to parameter of type 'keyof IListItem' "
    i want typescript throw me error :
    " Argument of type '"invalid"' is not assignable to parameter of type '"stt" | "name"'"
    Please help me! Thankyou!

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

      Could you ask in my Discord? mattpocock.com/discord

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

    How Posh... plugins!

  • @8koi245
    @8koi245 Рік тому

    welp have no idea about ts playground to begin with lol

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

    Hi, Matt! Your videos are amazing and what you doing sometimes looks like real magic to me =) And when I thought of that, I was interested - maybe you know or maybe can figure out the solution for one thing that bothers me from the time I switched from java to typescript two years ago: method chaining. In TypeScript\JavaScript there is no way to beautifully chain async methods (i mean like this: await someInstance.someAsyncMethod1().someAsyncMethod2().someAsyncMethod3() ... where every method returning 'this') - you should wrap any async method invocation into parenthesis and add await keyword, and that's looking clumsy and barely readable. Through years I found no solution for it. Maybe real TypeScript magician like you can show the way? =)

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

    Hey Matt! Mind to use your magic wand in this video for us? I watched it but didn't quite get it... Please
    v=B7ygRIQcQPE