mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
prepare for angular 1.3
This commit is contained in:
24
angularjs/angular.d.ts
vendored
24
angularjs/angular.d.ts
vendored
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user