1
- // Type definitions for angular-formly 6.18.0
1
+ // Type definitions for angular-formly 7.2.3
2
2
// Project: https://github.com/formly-js/angular-formly
3
3
// Definitions by: Scott Hatcher <https://github.com/scatcher>
4
- // Definitions: https://github.com/borisyankov /DefinitelyTyped
4
+ // Definitions: https://github.com/DefinitelyTyped /DefinitelyTyped
5
5
6
6
/// <reference path="../angularjs/angular.d.ts" />
7
7
@@ -16,18 +16,23 @@ declare module 'angular-formly' {
16
16
17
17
declare module AngularFormly {
18
18
19
+ interface IFieldArray extends Array < IFieldConfigurationObject | IFieldGroup > {
20
+
21
+ }
19
22
20
23
interface IFieldGroup {
21
24
data ?: Object ;
22
25
className ?: string ;
23
- elementAttributes ?: { [ key : string ] : string } ;
24
- fieldGroup : IFieldConfigurationObject [ ] ;
26
+ elementAttributes ?: string ;
27
+ fieldGroup : IFieldArray ;
25
28
form ?: Object ;
26
29
hide ?: boolean ;
27
- hideExpression ?: string | IExpresssionFunction ;
30
+ hideExpression ?: string | IExpressionFunction ;
28
31
key ?: string | number ;
29
32
model ?: string | Object ;
30
- options ?: IFormOptionsAPI
33
+ options ?: IFormOptionsAPI ;
34
+ templateOptions ?: ITemplateOptions ;
35
+ wrapper ?: string | string [ ] ;
31
36
}
32
37
33
38
@@ -46,7 +51,7 @@ declare module AngularFormly {
46
51
/**
47
52
* see http://docs.angular-formly.com/docs/formly-expressions#expressionproperties-validators--messages
48
53
*/
49
- interface IExpresssionFunction {
54
+ interface IExpressionFunction {
50
55
( $viewValue : any , $modelValue : any , scope : ITemplateScope ) : any ;
51
56
}
52
57
@@ -122,8 +127,8 @@ declare module AngularFormly {
122
127
* see http://docs.angular-formly.com/docs/field-configuration-object#validators-object
123
128
*/
124
129
interface IValidator {
125
- expression : string | IExpresssionFunction ;
126
- message ?: string | IExpresssionFunction ;
130
+ expression : string | IExpressionFunction ;
131
+ message ?: string | IExpressionFunction ;
127
132
}
128
133
129
134
@@ -154,7 +159,7 @@ declare module AngularFormly {
154
159
* see http://angular-formly.com/#/example/other/unique-value-async-validation
155
160
*/
156
161
asyncValidators ?: {
157
- [ key : string ] : string | IExpresssionFunction | IValidator ;
162
+ [ key : string ] : string | IExpressionFunction | IValidator ;
158
163
}
159
164
160
165
/**
@@ -204,7 +209,7 @@ declare module AngularFormly {
204
209
* see http://docs.angular-formly.com/docs/field-configuration-object#expressionproperties-object
205
210
*/
206
211
expressionProperties ?: {
207
- [ key : string ] : string | IExpresssionFunction | IValidator ;
212
+ [ key : string ] : string | IExpressionFunction | IValidator ;
208
213
}
209
214
210
215
@@ -224,7 +229,7 @@ declare module AngularFormly {
224
229
*
225
230
* see http://docs.angular-formly.com/docs/field-configuration-object#hideexpression-string--function
226
231
*/
227
- hideExpression ?: string | IExpresssionFunction ;
232
+ hideExpression ?: string | IExpressionFunction ;
228
233
229
234
230
235
/**
@@ -416,7 +421,7 @@ declare module AngularFormly {
416
421
* like in this example.
417
422
*/
418
423
messages ?: {
419
- [ key : string ] : IExpresssionFunction | string ;
424
+ [ key : string ] : IExpressionFunction | string ;
420
425
}
421
426
422
427
@@ -440,7 +445,7 @@ declare module AngularFormly {
440
445
* see http://docs.angular-formly.com/docs/field-configuration-object#validators-object
441
446
*/
442
447
validators ?: {
443
- [ key : string ] : string | IExpresssionFunction | IValidator ;
448
+ [ key : string ] : string | IExpressionFunction | IValidator ;
444
449
}
445
450
446
451
@@ -573,7 +578,7 @@ declare module AngularFormly {
573
578
//Shortcut to options.formControl
574
579
fc : ng . IFormController | ng . IFormController [ ] ;
575
580
//all the fields for the form
576
- fields : IFieldConfigurationObject [ ] ;
581
+ fields : IFieldArray ;
577
582
//the form controller the field is in
578
583
form : any ;
579
584
//The object passed as options.formState to the formly-form directive. Use this to share state between fields.
0 commit comments