diff --git a/notNeededPackages.json b/notNeededPackages.json index a91bf4f1e5..8d3fe8ff53 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -1146,6 +1146,12 @@ "sourceRepoURL": "https://github.com/sindresorhus/p-map", "asOfVersion": "2.0.0" }, + { + "libraryName": "p-pipe", + "typingsPackageName": "p-pipe", + "sourceRepoURL": "https://github.com/sindresorhus/p-pipe", + "asOfVersion": "2.0.0" + }, { "libraryName": "p-throttle", "typingsPackageName": "p-throttle", diff --git a/types/p-pipe/index.d.ts b/types/p-pipe/index.d.ts deleted file mode 100644 index 2c58bd8f01..0000000000 --- a/types/p-pipe/index.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -// Type definitions for p-pipe 1.2 -// Project: https://github.com/sindresorhus/p-pipe#readme -// Definitions by: BendingBender -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 - -export = pPipe; - -// tslint:disable:no-unnecessary-generics -declare function pPipe(...args: Tasks1): PromiseTask; -declare function pPipe(...args: Tasks2): PromiseTask; -declare function pPipe(...args: Tasks3): PromiseTask; -declare function pPipe(...args: Tasks4): PromiseTask; -declare function pPipe( - ...args: Tasks5 -): PromiseTask; -declare function pPipe( - ...args: Tasks6 -): PromiseTask; -declare function pPipe( - ...args: Tasks7 -): PromiseTask; -declare function pPipe( - ...args: Tasks8 -): PromiseTask; -declare function pPipe(...args: Array>): PromiseTask; - -declare function pPipe(tasks: Tasks1): PromiseTask; -declare function pPipe(tasks: Tasks2): PromiseTask; -declare function pPipe(tasks: Tasks3): PromiseTask; -declare function pPipe(tasks: Tasks4): PromiseTask; -declare function pPipe( - tasks: Tasks5 -): PromiseTask; -declare function pPipe( - tasks: Tasks6 -): PromiseTask; -declare function pPipe( - tasks: Tasks7 -): PromiseTask; -declare function pPipe( - tasks: Tasks8 -): PromiseTask; -declare function pPipe(tasks: Array>): PromiseTask; - -type Tasks1 = [PromiseTask]; -type Tasks2 = [Task, Task]; -type Tasks3 = [Task, Task, Task]; -type Tasks4 = [Task, Task, Task, Task]; -type Tasks5 = [ - Task, - Task, - Task, - Task, - Task -]; -type Tasks6 = [ - Task, - Task, - Task, - Task, - Task, - Task -]; -type Tasks7 = [ - Task, - Task, - Task, - Task, - Task, - Task, - Task -]; -type Tasks8 = [ - Task, - Task, - Task, - Task, - Task, - Task, - Task, - Task -]; - -type Task = (input: T) => PromiseLike | R; -type PromiseTask = (input: T) => Promise; diff --git a/types/p-pipe/p-pipe-tests.ts b/types/p-pipe/p-pipe-tests.ts deleted file mode 100644 index 8901637430..0000000000 --- a/types/p-pipe/p-pipe-tests.ts +++ /dev/null @@ -1,57 +0,0 @@ -import pPipe = require('p-pipe'); - -const addUnicorn = (str: string) => Promise.resolve(`${str} Unicorn`); -const addRainbow = (str: string) => Promise.resolve(`${str} Rainbow`); - -const pipeline = pPipe(addUnicorn, addRainbow); - -pipeline('❤️'); // $ExpectType Promise - -const strToInt = (s: string) => Promise.resolve(1); -const intToBool = (i: number) => Promise.resolve(true); -const boolToObj = (b: boolean) => Promise.resolve({}); -const objToNull = (o: object) => Promise.resolve(null); -const nullToVoid = (n: null) => Promise.resolve(undefined); -const voidToStr = (u: undefined) => Promise.resolve(''); - -pPipe(strToInt); // $ExpectType PromiseTask -pPipe(strToInt, intToBool); // $ExpectType PromiseTask -pPipe(strToInt, intToBool, boolToObj); // $ExpectType PromiseTask -pPipe(strToInt, intToBool, boolToObj, objToNull); // $ExpectType PromiseTask -pPipe(strToInt, intToBool, boolToObj, objToNull, nullToVoid); // $ExpectType PromiseTask -pPipe(strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr); // $ExpectType PromiseTask -pPipe(strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr, strToInt); // $ExpectType PromiseTask -pPipe(strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr, strToInt, intToBool); // $ExpectType PromiseTask -// $ExpectType PromiseTask -pPipe( - strToInt, - intToBool, - boolToObj, - objToNull, - nullToVoid, - voidToStr, - strToInt, - intToBool, - boolToObj -); - -pPipe([strToInt]); // $ExpectType PromiseTask -pPipe([strToInt, intToBool]); // $ExpectType PromiseTask -pPipe([strToInt, intToBool, boolToObj]); // $ExpectType PromiseTask -pPipe([strToInt, intToBool, boolToObj, objToNull]); // $ExpectType PromiseTask -pPipe([strToInt, intToBool, boolToObj, objToNull, nullToVoid]); // $ExpectType PromiseTask -pPipe([strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr]); // $ExpectType PromiseTask -pPipe([strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr, strToInt]); // $ExpectType PromiseTask -pPipe([strToInt, intToBool, boolToObj, objToNull, nullToVoid, voidToStr, strToInt, intToBool]); // $ExpectType PromiseTask -// $ExpectType PromiseTask -pPipe([ - strToInt, - intToBool, - boolToObj, - objToNull, - nullToVoid, - voidToStr, - strToInt, - intToBool, - boolToObj, -]); diff --git a/types/p-pipe/tsconfig.json b/types/p-pipe/tsconfig.json deleted file mode 100644 index 46cabfcfeb..0000000000 --- a/types/p-pipe/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "p-pipe-tests.ts" - ] -} diff --git a/types/p-pipe/tslint.json b/types/p-pipe/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/p-pipe/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" }