From e49b7e4223870e816fe3dc6edbb59d0a9d6505b3 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Date: Tue, 19 Aug 2014 03:03:59 -0300 Subject: [PATCH] prepare for angular 1.3 --- angularjs/angular.d.ts | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index cacf7647b7..ca964d9fac 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -267,12 +267,16 @@ declare module ng { $dirty: boolean; $valid: boolean; $invalid: boolean; + $submitted: boolean; $error: any; $addControl(control: ng.INgModelController): void; $removeControl(control: ng.INgModelController): void; $setValidity(validationErrorKey: string, isValid: boolean, control: ng.INgModelController): void; $setDirty(): void; $setPristine(): void; + $commitViewValue(): void; + $rollbackViewValue(): void; + $setSubmitted(): void; } /////////////////////////////////////////////////////////////////////////// @@ -285,6 +289,13 @@ declare module ng { // Documentation states viewValue and modelValue to be a string but other // types do work and it's common to use them. $setViewValue(value: any): void; + $validate(): void; + $setTouched(): void; + $setUntouched(): void; + $rollbackViewValue(): void; + $commitViewValue(revalidate?: boolean): void; + $isEmpty(value: any): boolean; + $viewValue: any; $modelValue: any; @@ -293,12 +304,23 @@ declare module ng { $formatters: IModelFormatter[]; $viewChangeListeners: IModelViewChangeListener[]; $error: any; + $name: string; + + $touched: boolean; + $untouched: boolean; + + $validators: IModelValidators; + $pristine: boolean; $dirty: boolean; $valid: boolean; $invalid: boolean; } + interface IModelValidators { + [index: string]: (...args: any[]) => boolean; + } + interface IModelParser { (value: any): any; } @@ -312,7 +334,7 @@ declare module ng { } /////////////////////////////////////////////////////////////////////////// - // Scope and RootScope + // Scope and RootScope // see https://docs.angularjs.org/api/ng/type/$rootScope.Scope and http://docs.angularjs.org/api/ng.$rootScope /////////////////////////////////////////////////////////////////////////// interface IRootScopeService {