Skip to content

Commit

Permalink
make return type of bear undefined instead of void
Browse files Browse the repository at this point in the history
  • Loading branch information
vilicvane committed Mar 2, 2017
1 parent 0f4c898 commit 988ca35
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ promise.
Wrap a Node.js-style asynchronous function to a function that returns
promise.

#### [[+]](src/miscellaneous.ts#L6) `bear(error: any): void`
#### [[+]](src/miscellaneous.ts#L6) `bear(error: any): undefined`

A no-operation function that acts as the rejection handler of a promise.

#### [[+]](src/miscellaneous.ts#L12) `sleep(duration: number): Promise<void>`
#### [[+]](src/miscellaneous.ts#L14) `sleep(duration: number): Promise<void>`

Create a promise that will be fulfilled in given duration (milliseconds).

#### [[+]](src/miscellaneous.ts#L31) `retry<T>(handler: RetryHandler<T>, options?: RetryOptions): Promise<T>`
#### [[+]](src/miscellaneous.ts#L33) `retry<T>(handler: RetryHandler<T>, options?: RetryOptions): Promise<T>`

Retry procedure in the handler for several times.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "villa",
"version": "0.2.10",
"version": "0.2.11",
"description": "Promise utilities for async/await-ready environment.",
"main": "bld/index.js",
"typings": "bld/index.d.ts",
Expand Down
4 changes: 3 additions & 1 deletion src/miscellaneous.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { Resolvable } from './';
/**
* A no-operation function that acts as the rejection handler of a promise.
*/
export function bear(error: any): void { }
export function bear(error: any): undefined {
return undefined;
}

/**
* Create a promise that will be fulfilled in given duration (milliseconds).
Expand Down

0 comments on commit 988ca35

Please sign in to comment.