GitShow/sindresorhus/p-defer
sindresorhus

p-defer

Create a deferred promise

by sindresorhus
Star on GitHubForknpm

JavaScript

87 stars9 forks6 contributorsQuiet · 11mo agoSince 2016v4.0.1MIT

Meet the team

See all 6 on GitHub →
sindresorhus
sindresorhus16 contributions
BendingBender
BendingBender2 contributions
coreyfarrell
coreyfarrell1 contribution
callmehiphop
callmehiphop1 contribution
JacobLey
JacobLey1 contribution
Richienb
Richienb1 contribution

Languages

View on GitHub →
JavaScript57.2%
TypeScript42.8%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
fregante
`Promise.withResolvers` coming in 2024ClosedIssue

It looks like this module can be deprecated sometime in the future, thanks to this Stage-3 proposal: https://github.com/tc39/proposal-promise-with-resolvers

fregante · 11mo ago
JacobLey
Update typings to explicitly not require a bound `this`MergedPR

If a user attempts to destructure the defer object, it can get flagged by @typescript-eslint/unbound-method. The actual implementation does not at all require a reference to this (+ is the native value provided in the promise callback), but the typescript definitions do not make it clear, and since it is being pulled off a object, eslint thinks it _might_ need a reference to . Example: (This example is an oversimplification, and not a great place to legitimately use this library, but enough to recreate the issue) The solution is to just update the typing to explicitly declare the as ignorable ().

JacobLey · 2y ago
yosbelms
ESM error in v4ClosedIssue

I get the following error when using . The error is explicit, and offers 2 possible solutions.

yosbelms · 5y ago
Structured data for AI agents

Repository: sindresorhus/p-defer. Description: Create a deferred promise Stars: 87, Forks: 9. Primary language: JavaScript. Languages: JavaScript (57.2%), TypeScript (42.8%). License: MIT. Latest release: v4.0.1 (2y ago). Open PRs: 0, open issues: 0. Last activity: 11mo ago. Community health: 85%. Top contributors: sindresorhus, BendingBender, coreyfarrell, callmehiphop, JacobLey, Richienb.

·@ofershap

Replace github.com with gitshow.dev