Rezultati pretraživanja
  1. 29. sij

    I actually forgot about this one in yesterday's . Thanks :)

  2. 28. sij
    Odgovor korisniku/ci

    Hi, please find the unroll here: Thread by : This , we're going to take a look at 's interfaces. Interfaces are… . See you soon. 🤖

  3. 28. sij

    Next week we'll start on types. I hope you've learned something today, and I'll see you next . 👋 You can find all examples in a TypeScript playground here:

    Prikaži ovu nit
  4. 28. sij

    This , we're going to take a look at 's interfaces. Interfaces are different from types and both have their strengths in different situations. Let's take a look. This is just some interface definition - again an example from the types: 🧵👇

    interface Action {
  type: string;
}
    Prikaži ovu nit
  5. 21. sij
    Odgovor korisniku/ci

    Halo!, please find the unroll here: Thread by : Last , we left off with a version of -toolkit's `createAction` method that… . Talk to you soon. 🤖

  6. 21. sij

    Last , we left off with a version of -toolkit's `createAction` method that could be used with a mix of inferred and explicit Generic Arguments. But that method would still take every `type` - including objects. Let's see how to restrict that.

    function createAction<P, T = string>(type: T, prepare?: PrepareAction<P>): ActionCreator<P, T> {
  return (payload: P) => ({
    type,
    payload
  });
}

//              this should not be possible
//                        v
// ActionCreator<number, Text>
const invalidAction = createAction(
  document.createTextNode("I really shouldn't be used as type!"),
  withPayloadType<number>()
);
    Prikaži ovu nit
  7. 14. sij

    While last we looked at Generics Basics, today we continue where we left off, by taking a closer look at type argument inference, pitfalls and workarounds. We will take a look at a simplified version of -toolkit's `createAction` function. 🧵👇

    interface PayloadAction<P, T = string> {
  type: T;
  payload: P;
}

type ActionCreator<P, T> = (payload: P) => PayloadAction<P, T>;

function createAction<P, T = string>(type: T): ActionCreator<P, T> {
  return (payload: P) => ({
    type,
    payload
  });
}
    Prikaži ovu nit
  8. 7. sij

    Hello! 👋 This is my first post in the series. Today, we're going to talk about the basics of Generics. Let's take this (simplified) example type from Toolkit and let's try to understand it.

    Prikaži ovu nit
  9. 30. lis 2018.

    If you've ever thought about using , but you're not sure where to begin, check out our recently updated post "The Definitive TypeScript Guide" for an overview of key features, recent updates, and other helpful tips!

  10. 8. svi 2018.

    Typescript Tuesday what’s up people happy coding . Top of the hour it’s going down on my way to go study some Data base query operators using

  11. 22. stu 2016.

    Perhaps we could have for the modernists. I'm reckoning for the maritime historians. ?

  12. 20. tra 2015.

Čini se da učitavanje traje već neko vrijeme.

Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.