mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
[p-map] Remove type definitions
This commit is contained in:
@@ -1134,6 +1134,12 @@
|
||||
"sourceRepoURL": "http://onsen.io",
|
||||
"asOfVersion": "2.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "p-map",
|
||||
"typingsPackageName": "p-map",
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/p-map",
|
||||
"asOfVersion": "2.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "p-throttle",
|
||||
"typingsPackageName": "p-throttle",
|
||||
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
// Type definitions for p-map 1.1
|
||||
// Project: https://github.com/sindresorhus/p-map#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
export = pMap;
|
||||
|
||||
declare function pMap<T = any, M = T>(input: Iterable<Input<T>>, mapper: Mapper<T, M>, options?: pMap.Options): Promise<M[]>;
|
||||
|
||||
type Input<T> = Promise<T> | PromiseLike<T> | T;
|
||||
type Mapper<T, R> = (el: T, index: number) => Promise<R> | R;
|
||||
|
||||
declare namespace pMap {
|
||||
interface Options {
|
||||
concurrency?: number;
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import pMap = require('p-map');
|
||||
|
||||
const sites = [
|
||||
Promise.resolve('sindresorhus'),
|
||||
true,
|
||||
1
|
||||
];
|
||||
|
||||
const mapper = (el: number | string | boolean) => Promise.resolve(1);
|
||||
|
||||
let num: number;
|
||||
pMap(sites, mapper, {concurrency: 2}).then(result => {
|
||||
num = result[3];
|
||||
});
|
||||
|
||||
pMap(sites, mapper).then(result => {
|
||||
num = result[3];
|
||||
});
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"p-map-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user