From 7b28209e09c95aa4b92b52ae3c0b91f64780ac26 Mon Sep 17 00:00:00 2001 From: Alexander Fisher Date: Wed, 6 Apr 2016 07:15:33 -0400 Subject: [PATCH] Angular ui bootstrap: Update IModalSettings controller and resolve properties to not be any type * Update resolve and controller from any to something more explicit that matches docs for invoke, ui-router resolve, and angular-ui-bootstrap modal settings. * Add comments to clarify structure of array. * Add object in the union type for values of resolve object. --- angular-ui-bootstrap/angular-ui-bootstrap.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts index 64518c0cd..29ad03485 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts @@ -308,8 +308,9 @@ declare namespace angular.ui.bootstrap { /** * a controller for a modal instance - it can initialize scope used by modal. * A controller can be injected with `$modalInstance` + * If value is an array, it must be in Inline Array Annotation format for injection (strings followed by factory method) */ - controller?: any; + controller?: string | Function | Array; /** * an alternative to the controller-as syntax, matching the API of directive definitions. @@ -326,8 +327,9 @@ declare namespace angular.ui.bootstrap { /** * members that will be resolved and passed to the controller as locals; it is equivalent of the `resolve` property for AngularJS routes + * If property value is an array, it must be in Inline Array Annotation format for injection (strings followed by factory method) */ - resolve?: any; + resolve?: { [ key: string ]: string | Function | Array | Object }; /** * Set to false to disable animations on new modal/backdrop. Does not toggle animations for modals/backdrops that are already displayed.