Skip to content

Commit

Permalink
[Patch] Add type definitions for cancel callback.
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Jun 24, 2019
1 parent 662fec8 commit cbc1ed0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

### Added
- [Patch] Add type definitions for cancel callback.

## [7.1.0] - 2019-06-23

### Added
Expand Down
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ declare module 'passable' {
* Registers a completion callback for a specific field
*/
after: (fieldName: string, callback: (res: PassableNS.IValidationResult) => void) => PassableNS.IValidationResult;

/**
* Cancels Async tests callbacks (after/done)
*/
cancel: () => PassableNS.IValidationResult;
}

export type IFunctionOrPromise = () => void | Promise<any>;
Expand Down

0 comments on commit cbc1ed0

Please sign in to comment.