Skip to content

Commit

Permalink
Merge pull request #1119 from smithgeek/patch-1
Browse files Browse the repository at this point in the history
Use Index Type for property name in intercept
  • Loading branch information
mweststrate authored Aug 8, 2017
2 parents 8d4b0e3 + c4441bf commit 3d47b59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/intercept.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export function intercept<T>(
handler: IInterceptor<IValueWillChange<T>>
): Lambda
export function intercept(object: Object, handler: IInterceptor<IObjectWillChange>): Lambda
export function intercept(
object: Object,
property: string,
export function intercept<T extends Object, K extends keyof T>(
object: T,
property: K,
handler: IInterceptor<IValueWillChange<any>>
): Lambda
export function intercept(thing, propOrHandler?, handler?): Lambda {
Expand Down

0 comments on commit 3d47b59

Please sign in to comment.