Last 12 weeks · 1 commit
4 of 6 standards met
Summary The "How can I promisify a single class method?" FAQ example referenced an undefined variable instead of the declared above it, and declared twice in the same code block. Copy-pasting the example as-is would throw: Changes Replaced with (the actual declared variable) in all three usages Renamed the second to to avoid the duplicate declaration Docs-only change, no code/behavior affected.
Closes #74 Pros and cons compared to #85 Pros: No need for as many overloads Supports as many generics as you like Support for as many callback arguments as you like when . Although not sure if this is in scope in the context of the options. Cons: returns instead of erroring - at runtime this promise will simply never resolve or reject. A bit of annoying DX but isn't unsafe. Todo: [x] Promisifying modules with includes and excludes [x] Document clearly that overloaded functions are not supported and only the final overload will be chosen: https://github.com/microsoft/TypeScript/issues/32164 [x] Support [x] Support IssueHunt Summary Referenced issues This pull request has been submitted to: #74: Add TypeScript type definition
Repository: sindresorhus/pify. Description: Promisify a callback-style function Stars: 1503, Forks: 73. Primary language: JavaScript. Languages: JavaScript (71.5%), TypeScript (28.5%). License: MIT. Topics: promise-utilities, promises, promisify. Latest release: v6.1.0 (3y ago). Open PRs: 0, open issues: 0. Last activity: 1mo ago. Community health: 85%. Top contributors: sindresorhus, dsblv, schnittstabil, Richienb, SamVerschueren, tom-sherman, coreyfarrell, DanSnow, danthegoodman, fregante and others.