The Mighty Deferred Promise - An Interview Recount @LachlanMiller
The Mighty Deferred Promise - An Interview Recount  @LachlanMiller
Uploaded November 2023 | Updated November 2026, 20 hours ago
❗️ See the comments - I over-engineered this, my solution is far from ideal. Good discussion in comments!
👉 I am writing a book on tooling! Check it out: https://lachlan-miller.ck.page/92dfa021b3
🐦 twitter.com/Lachlan19900
I had an interview recently which featured an interesting question. In this video, I share the question and my solution, along with a construct, the mighty deferred promise. There's a TC39 proposal for it under the name "withResolvers": github.com/tc39/proposal-promise-with-resolvers

Corrections: 5:00 p-defer isn't necessary here - you can just return a promise. p-defer is useful if you want to resolve or reject the promise afterwards, from outside the location it was originally created. Example improvement: gist.github.com/lmiller1990/26eb3c2d76eb8c122a0012c1e47dc15e. See comments for discussion.
The Mighty Deferred Promise - An Interview RecountVue Test Utils integration and more examples - [Vue Testing Library 8/8][Testing Vue 3 apps] 1.2 - Factory functions for concise testsRefactoring an App 1/2: Creating a ComposableWriting to a PDF [Vue 3 Custom Renderers 4/7][Testing Composables with Tic Tac Toe] Some Defensive Programming (9/10)Typesafe GraphQL and Vue 5/9 - GraphQL models with Nexus Decorators[Vue.js 3 Crash Course] 1.4: Control Flow with v-if and v-elseHeadless UI 1.0 is out! Building React and Vue Components with Tailwind CSSTyping the TypeScript InterviewTypesafe GraphQL and Vue 6/9 - Top Level Query with NexusDOM Queries - [Vue Testing Library 1/8]
Lachlan Miller |

The Mighty Deferred Promise - An Interview Recount

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER