Skip to content

Commit

Permalink
refactor: all interfaces that did not start with the letter 'I' were …
Browse files Browse the repository at this point in the history
…fixed and now they start with '

BREAKING CHANGES: rename all interfaces that did not start with the letter 'I'
  • Loading branch information
yisraelx committed Feb 27, 2018
1 parent aaa3277 commit 8c8de27
Show file tree
Hide file tree
Showing 25 changed files with 142 additions and 142 deletions.
4 changes: 2 additions & 2 deletions modules/-all/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ export { default as mapParallel } from '@promises/map-parallel';
export { default as mapSeries } from '@promises/map-series';
export { default as next } from '@promises/next';
export { default as parallel } from '@promises/parallel';
export { default as promisify, PromisifyOptions } from '@promises/promisify';
export { default as promisify, IPromisifyOptions } from '@promises/promisify';
export { default as reduceSeries } from '@promises/reduce-series';
export { default as reduceRightSeries } from '@promises/reduce-right-series';
export { default as rejectParallel } from '@promises/reject-parallel';
export { default as rejectSeries } from '@promises/reject-series';
export { default as reset } from '@promises/reset';
export { default as retry, RetryOptions, RetryFilterInfo, RetryTimeInfo } from '@promises/retry';
export { default as retry, IRetryOptions, IRetryFilterInfo, IRetryTimeInfo } from '@promises/retry';
export { default as series } from '@promises/series';
export { default as sleep } from '@promises/sleep';
export { default as someParallel } from '@promises/some-parallel';
Expand Down
2 changes: 1 addition & 1 deletion modules/-constructor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export { default as create } from '@promises/create';
export { default as delay } from '@promises/delay';
export { default as exec } from '@promises/exec';
export { default as isPromise } from '@promises/is-promise';
export { default as promisify, PromisifyOptions } from '@promises/promisify';
export { default as promisify, IPromisifyOptions } from '@promises/promisify';
export { default as parallel } from '@promises/parallel';
export { default as series } from '@promises/series';
export { default as timeout } from '@promises/timeout';
Expand Down
2 changes: 1 addition & 1 deletion modules/-prototype/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export { default as reduceRightSeries } from '@promises/reduce-right-series';
export { default as rejectParallel } from '@promises/reject-parallel';
export { default as rejectSeries } from '@promises/reject-series';
export { default as reset } from '@promises/reset';
export { default as retry, RetryOptions, RetryFilterInfo, RetryTimeInfo } from '@promises/retry';
export { default as retry, IRetryOptions, IRetryFilterInfo, IRetryTimeInfo } from '@promises/retry';
export { default as sleep } from '@promises/sleep';
export { default as someParallel } from '@promises/some-parallel';
export { default as someSeries } from '@promises/some-series';
Expand Down
20 changes: 10 additions & 10 deletions modules/compose/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import Promises from '@promises/core';
import reduce from '@promises/reduce-series';
import { OptionalPromise } from '@promises/interfaces';
import { IOptionalPromise } from '@promises/interfaces';

/**
* @example
Expand All @@ -21,15 +21,15 @@ import { OptionalPromise } from '@promises/interfaces';
* });
* ```
*/
function composeStatic<T, P1, R>(fn1: (value?: OptionalPromise<T>) => OptionalPromise<P1>, fn2: (value: OptionalPromise<P1>) => OptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, R>(fn1: (value?: OptionalPromise<T>) => OptionalPromise<P1>, fn2: (value: OptionalPromise<P1>) => OptionalPromise<P2>, fn3: (value: OptionalPromise<P2>) => OptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, R>(fn1: (value?: OptionalPromise<T>) => OptionalPromise<P1>, fn2: (value: OptionalPromise<P1>) => OptionalPromise<P2>, fn3: (value: OptionalPromise<P2>) => OptionalPromise<P3>, fn4: (value: OptionalPromise<P3>) => OptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, P4, R>(fn1: (value?: OptionalPromise<T>) => OptionalPromise<P1>, fn2: (value: OptionalPromise<P1>) => OptionalPromise<P2>, fn3: (value: OptionalPromise<P2>) => OptionalPromise<P3>, fn4: (value: OptionalPromise<P3>) => OptionalPromise<P4>, fn5: (value: OptionalPromise<P4>) => OptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, P4, P5, R>(fn1: (value?: OptionalPromise<T>) => OptionalPromise<P1>, fn2: (value: OptionalPromise<P1>) => OptionalPromise<P2>, fn3: (value: OptionalPromise<P2>) => OptionalPromise<P3>, fn4: (value: OptionalPromise<P3>) => OptionalPromise<P4>, fn5: (value: OptionalPromise<P4>) => OptionalPromise<P5>, fn6: (value: OptionalPromise<P5>) => OptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, P4, P5, P6, R>(fn1: (value?: OptionalPromise<T>) => OptionalPromise<P1>, fn2: (value: OptionalPromise<P1>) => OptionalPromise<P2>, fn3: (value: OptionalPromise<P2>) => OptionalPromise<P3>, fn4: (value: OptionalPromise<P3>) => OptionalPromise<P4>, fn5: (value: OptionalPromise<P4>) => OptionalPromise<P5>, fn6: (value: OptionalPromise<P5>) => OptionalPromise<P6>, fn7: (value: OptionalPromise<P6>) => OptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, P4, P5, P6, P7, R>(fn1: (value?: OptionalPromise<T>) => OptionalPromise<P1>, fn2: (value: OptionalPromise<P1>) => OptionalPromise<P2>, fn3: (value: OptionalPromise<P2>) => OptionalPromise<P3>, fn4: (value: OptionalPromise<P3>) => OptionalPromise<P4>, fn5: (value: OptionalPromise<P4>) => OptionalPromise<P5>, fn6: (value: OptionalPromise<P5>) => OptionalPromise<P6>, fn7: (value: OptionalPromise<P6>) => OptionalPromise<P7>, fn8: (value: OptionalPromise<P7>) => OptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, P4, P5, P6, P7, P8, R>(fn1: (value?: OptionalPromise<T>) => OptionalPromise<P1>, fn2: (value: OptionalPromise<P1>) => OptionalPromise<P2>, fn3: (value: OptionalPromise<P2>) => OptionalPromise<P3>, fn4: (value: OptionalPromise<P3>) => OptionalPromise<P4>, fn5: (value: OptionalPromise<P4>) => OptionalPromise<P5>, fn6: (value: OptionalPromise<P5>) => OptionalPromise<P6>, fn7: (value: OptionalPromise<P6>) => OptionalPromise<P7>, fn8: (value: OptionalPromise<P7>) => OptionalPromise<P8>, fn9: (value: OptionalPromise<P8>) => OptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, R>(fn1: (value?: OptionalPromise<T>) => OptionalPromise<P1>, fn2: (value: OptionalPromise<P1>) => OptionalPromise<P2>, fn3: (value: OptionalPromise<P2>) => OptionalPromise<P3>, fn4: (value: OptionalPromise<P3>) => OptionalPromise<P4>, fn5: (value: OptionalPromise<P4>) => OptionalPromise<P5>, fn6: (value: OptionalPromise<P5>) => OptionalPromise<P6>, fn7: (value: OptionalPromise<P6>) => OptionalPromise<P7>, fn8: (value: OptionalPromise<P7>) => OptionalPromise<P8>, fn9: (value: OptionalPromise<P8>) => OptionalPromise<P9>, fn10: (value: OptionalPromise<P9>) => OptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, R>(fn1: (value?: IOptionalPromise<T>) => IOptionalPromise<P1>, fn2: (value: IOptionalPromise<P1>) => IOptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, R>(fn1: (value?: IOptionalPromise<T>) => IOptionalPromise<P1>, fn2: (value: IOptionalPromise<P1>) => IOptionalPromise<P2>, fn3: (value: IOptionalPromise<P2>) => IOptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, R>(fn1: (value?: IOptionalPromise<T>) => IOptionalPromise<P1>, fn2: (value: IOptionalPromise<P1>) => IOptionalPromise<P2>, fn3: (value: IOptionalPromise<P2>) => IOptionalPromise<P3>, fn4: (value: IOptionalPromise<P3>) => IOptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, P4, R>(fn1: (value?: IOptionalPromise<T>) => IOptionalPromise<P1>, fn2: (value: IOptionalPromise<P1>) => IOptionalPromise<P2>, fn3: (value: IOptionalPromise<P2>) => IOptionalPromise<P3>, fn4: (value: IOptionalPromise<P3>) => IOptionalPromise<P4>, fn5: (value: IOptionalPromise<P4>) => IOptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, P4, P5, R>(fn1: (value?: IOptionalPromise<T>) => IOptionalPromise<P1>, fn2: (value: IOptionalPromise<P1>) => IOptionalPromise<P2>, fn3: (value: IOptionalPromise<P2>) => IOptionalPromise<P3>, fn4: (value: IOptionalPromise<P3>) => IOptionalPromise<P4>, fn5: (value: IOptionalPromise<P4>) => IOptionalPromise<P5>, fn6: (value: IOptionalPromise<P5>) => IOptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, P4, P5, P6, R>(fn1: (value?: IOptionalPromise<T>) => IOptionalPromise<P1>, fn2: (value: IOptionalPromise<P1>) => IOptionalPromise<P2>, fn3: (value: IOptionalPromise<P2>) => IOptionalPromise<P3>, fn4: (value: IOptionalPromise<P3>) => IOptionalPromise<P4>, fn5: (value: IOptionalPromise<P4>) => IOptionalPromise<P5>, fn6: (value: IOptionalPromise<P5>) => IOptionalPromise<P6>, fn7: (value: IOptionalPromise<P6>) => IOptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, P4, P5, P6, P7, R>(fn1: (value?: IOptionalPromise<T>) => IOptionalPromise<P1>, fn2: (value: IOptionalPromise<P1>) => IOptionalPromise<P2>, fn3: (value: IOptionalPromise<P2>) => IOptionalPromise<P3>, fn4: (value: IOptionalPromise<P3>) => IOptionalPromise<P4>, fn5: (value: IOptionalPromise<P4>) => IOptionalPromise<P5>, fn6: (value: IOptionalPromise<P5>) => IOptionalPromise<P6>, fn7: (value: IOptionalPromise<P6>) => IOptionalPromise<P7>, fn8: (value: IOptionalPromise<P7>) => IOptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, P4, P5, P6, P7, P8, R>(fn1: (value?: IOptionalPromise<T>) => IOptionalPromise<P1>, fn2: (value: IOptionalPromise<P1>) => IOptionalPromise<P2>, fn3: (value: IOptionalPromise<P2>) => IOptionalPromise<P3>, fn4: (value: IOptionalPromise<P3>) => IOptionalPromise<P4>, fn5: (value: IOptionalPromise<P4>) => IOptionalPromise<P5>, fn6: (value: IOptionalPromise<P5>) => IOptionalPromise<P6>, fn7: (value: IOptionalPromise<P6>) => IOptionalPromise<P7>, fn8: (value: IOptionalPromise<P7>) => IOptionalPromise<P8>, fn9: (value: IOptionalPromise<P8>) => IOptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, R>(fn1: (value?: IOptionalPromise<T>) => IOptionalPromise<P1>, fn2: (value: IOptionalPromise<P1>) => IOptionalPromise<P2>, fn3: (value: IOptionalPromise<P2>) => IOptionalPromise<P3>, fn4: (value: IOptionalPromise<P3>) => IOptionalPromise<P4>, fn5: (value: IOptionalPromise<P4>) => IOptionalPromise<P5>, fn6: (value: IOptionalPromise<P5>) => IOptionalPromise<P6>, fn7: (value: IOptionalPromise<P6>) => IOptionalPromise<P7>, fn8: (value: IOptionalPromise<P7>) => IOptionalPromise<P8>, fn9: (value: IOptionalPromise<P8>) => IOptionalPromise<P9>, fn10: (value: IOptionalPromise<P9>) => IOptionalPromise<R>): (value?: T) => Promises<R>;
function composeStatic(...functions) {
return (value) => {
return reduce(functions, (value, fn) => {
Expand Down
6 changes: 3 additions & 3 deletions modules/create/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import Promises from '@promises/core';
import { IExecute } from '@promises/interfaces';
import { IExecutor } from '@promises/interfaces';

/**
* @example
Expand All @@ -20,8 +20,8 @@ import { IExecute } from '@promises/interfaces';
* });
* ```
*/
function createStatic<T>(execute: IExecute<T> = (resolve) => resolve()): Promises<T> {
return new Promises(execute);
function createStatic<T>(executor: IExecutor<T> = (resolve) => resolve()): Promises<T> {
return new Promises(executor);
}

export default createStatic;
Expand Down
4 changes: 2 additions & 2 deletions modules/error/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import Promises from '@promises/core';
import { OptionalPromise } from '@promises/interfaces';
import { IOptionalPromise } from '@promises/interfaces';

/**
* @example
Expand All @@ -25,7 +25,7 @@ import { OptionalPromise } from '@promises/interfaces';
* });
* ```
*/
function error(promises: OptionalPromise<any>, value: any): Promises<any> {
function error(promises: IOptionalPromise<any>, value: any): Promises<any> {
return Promises.resolve(promises).then(() => {
throw value;
}) as Promises<any>;
Expand Down
4 changes: 2 additions & 2 deletions modules/exec/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import Promises from '@promises/core';
import { OptionalPromise } from '@promises/interfaces';
import { IOptionalPromise } from '@promises/interfaces';

/**
* @example
Expand All @@ -20,7 +20,7 @@ import { OptionalPromise } from '@promises/interfaces';
* });
* ```
*/
function execStatic<R>(fn: () => OptionalPromise<R>): Promises<R> {
function execStatic<R>(fn: () => IOptionalPromise<R>): Promises<R> {
return Promises.resolve().then(fn) as Promises<R>;
}

Expand Down
6 changes: 3 additions & 3 deletions modules/finally/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import Promises from '@promises/core';
import { OptionalPromise } from '@promises/interfaces';
import { IOptionalPromise } from '@promises/interfaces';

/**
* @example
Expand All @@ -25,7 +25,7 @@ import { OptionalPromise } from '@promises/interfaces';
* });
* ```
*/
function _finally<R>(promise: OptionalPromise<any>, fn: () => OptionalPromise<any>): Promises<R> {
function _finally<R>(promise: IOptionalPromise<any>, fn: () => IOptionalPromise<any>): Promises<R> {
let onBoth = (value) => {
let result = fn();
return Promise.resolve(result).then(() => value);
Expand Down Expand Up @@ -57,6 +57,6 @@ declare module '@promises/core' {
* });
* ```
*/
finally(this: Promises<T>, fn: () => OptionalPromise<any>): Promises<T>;
finally(this: Promises<T>, fn: () => IOptionalPromise<any>): Promises<T>;
}
}
Loading

0 comments on commit 8c8de27

Please sign in to comment.