Require Node.js 8
This commit is contained in:
parent
21c1db5aa0
commit
71b64de6d6
|
@ -3,4 +3,3 @@ node_js:
|
|||
- '12'
|
||||
- '10'
|
||||
- '8'
|
||||
- '6'
|
||||
|
|
|
@ -21,7 +21,6 @@ declare namespace pDefer {
|
|||
}
|
||||
}
|
||||
|
||||
declare const pDefer: {
|
||||
/**
|
||||
Create a deferred promise.
|
||||
|
||||
|
@ -41,14 +40,6 @@ declare const pDefer: {
|
|||
})();
|
||||
```
|
||||
*/
|
||||
<ValueType>(): pDefer.DeferredPromise<ValueType>;
|
||||
|
||||
// TODO: Remove this for the next major release, refactor the whole definition to:
|
||||
// declare function pDefer<ValueType>(): pDefer.DeferredPromise<
|
||||
// ValueType
|
||||
// >;
|
||||
// export = pDefer;
|
||||
default: typeof pDefer;
|
||||
};
|
||||
declare function pDefer<ValueType>(): pDefer.DeferredPromise<ValueType>;
|
||||
|
||||
export = pDefer;
|
||||
|
|
2
index.js
2
index.js
|
@ -12,5 +12,3 @@ const pDefer = () => {
|
|||
};
|
||||
|
||||
module.exports = pDefer;
|
||||
// TODO: Remove this for the next major release
|
||||
module.exports.default = pDefer;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
|
@ -29,12 +29,11 @@
|
|||
"later",
|
||||
"async",
|
||||
"await",
|
||||
"promises",
|
||||
"bluebird"
|
||||
"promises"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^2.0.0",
|
||||
"tsd": "^0.7.2",
|
||||
"tsd": "^0.7.3",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,15 +36,10 @@ function delay(ms) {
|
|||
|
||||
### pDefer()
|
||||
|
||||
Returns an `Object` with a `promise` property and functions to `resolve()` and `reject()`.
|
||||
Returns an `object` with a `promise` property and functions to `resolve()` and `reject()`.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [p-lazy](https://github.com/sindresorhus/p-lazy) - Create a lazy promise that defers execution until `.then()` or `.catch()` is called
|
||||
- [More…](https://github.com/sindresorhus/promise-fun)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
|
|
Loading…
Reference in New Issue