Skip to content

Commit

Permalink
Merge pull request #5101 from use-strict/master
Browse files Browse the repository at this point in the history
angularjs/angular.d.ts - Type safety for $watch and $watchCollection
  • Loading branch information
basarat committed Jul 29, 2015
2 parents 9e42013 + 3552788 commit 855569d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions angularjs/angular.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -617,12 +617,12 @@ declare module angular {
$on(name: string, listener: (event: IAngularEvent, ...args: any[]) => any): Function;

$watch(watchExpression: string, listener?: string, objectEquality?: boolean): Function;
$watch(watchExpression: string, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: boolean): Function;
$watch<T>(watchExpression: string, listener?: (newValue: T, oldValue: T, scope: IScope) => any, objectEquality?: boolean): Function;
$watch(watchExpression: (scope: IScope) => any, listener?: string, objectEquality?: boolean): Function;
$watch(watchExpression: (scope: IScope) => any, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: boolean): Function;
$watch<T>(watchExpression: (scope: IScope) => T, listener?: (newValue: T, oldValue: T, scope: IScope) => any, objectEquality?: boolean): Function;

$watchCollection(watchExpression: string, listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
$watchCollection(watchExpression: (scope: IScope) => any, listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
$watchCollection<T>(watchExpression: string, listener: (newValue: T, oldValue: T, scope: IScope) => any): Function;
$watchCollection<T>(watchExpression: (scope: IScope) => T, listener: (newValue: T, oldValue: T, scope: IScope) => any): Function;

$watchGroup(watchExpressions: any[], listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
$watchGroup(watchExpressions: { (scope: IScope): any }[], listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
Expand Down

0 comments on commit 855569d

Please sign in to comment.