PodRocket - A web development podcast from LogRocket cover image

Matt Pocock answers your TypeScript questions

PodRocket - A web development podcast from LogRocket

00:00

How to Solve Partial Interference in React and TypeScript

The TypeScript team admitted this was actually an error of theirs, just an oversight. If you have multiple type arguments that a function expects, if you pass in the first one, then the other two won't be inferred from the runtime arguments. It like stops inference. This is a massive pain because library maintainers have been complaining about this for ages. We had nightmares about it in xstate because we wanted people to specify different context or events that could happen on the state machines. But we can't. And so really, you're just talking about literally a generic inside the props and that's it. The feature that we should have shipped years ago, you can now enable it just by

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app