Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit c8de0e4

Browse files
docs($injector): add array annotation to all injectable parameters
Closes #11507
1 parent 9717c8f commit c8de0e4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/auto/injector.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ function annotate(fn, strictDi, name) {
190190
* @description
191191
* Invoke the method and supply the method arguments from the `$injector`.
192192
*
193-
* @param {!Function} fn The function to invoke. Function parameters are injected according to the
194-
* {@link guide/di $inject Annotation} rules.
193+
* @param {Function|Array.<string|Function>} fn The injectable function to invoke. Function parameters are
194+
* injected according to the {@link guide/di $inject Annotation} rules.
195195
* @param {Object=} self The `this` for the invoked method.
196196
* @param {Object=} locals Optional object. If preset then any argument names are read from this
197197
* object first, before the `$injector` is consulted.
@@ -458,8 +458,8 @@ function annotate(fn, strictDi, name) {
458458
* configure your service in a provider.
459459
*
460460
* @param {string} name The name of the instance.
461-
* @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand
462-
* for `$provide.provider(name, {$get: $getFn})`.
461+
* @param {Function|Array.<string|Function>} $getFn The injectable $getFn for the instance creation.
462+
* Internally this is a short hand for `$provide.provider(name, {$get: $getFn})`.
463463
* @returns {Object} registered provider instance
464464
*
465465
* @example
@@ -494,7 +494,8 @@ function annotate(fn, strictDi, name) {
494494
* as a type/class.
495495
*
496496
* @param {string} name The name of the instance.
497-
* @param {Function} constructor A class (constructor function) that will be instantiated.
497+
* @param {Function|Array.<string|Function>} constructor An injectable class (constructor function)
498+
* that will be instantiated.
498499
* @returns {Object} registered provider instance
499500
*
500501
* @example
@@ -593,7 +594,7 @@ function annotate(fn, strictDi, name) {
593594
* object which replaces or wraps and delegates to the original service.
594595
*
595596
* @param {string} name The name of the service to decorate.
596-
* @param {Function|Array} decorator This function will be invoked when the service needs to be
597+
* @param {Function|Array.<string|Function>} decorator This function will be invoked when the service needs to be
597598
* instantiated and should return the decorated service instance. The function is called using
598599
* the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.
599600
* Local injection arguments:

0 commit comments

Comments
 (0)