Skip to content

Commit ec4e21d

Browse files
committed
Update the documentation for a parameter decorator
1 parent 23879ee commit ec4e21d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

pages/Decorators.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,11 @@ A *Parameter Decorator* is declared just before a parameter declaration.
325325
The parameter decorator is applied to the function for a class constructor or method declaration.
326326
A parameter decorator cannot be used in a declaration file, an overload, or in any other ambient context (such as in a `declare` class).
327327

328-
The expression for the parameter decorator will be called as a function at runtime, with the following two arguments:
328+
The expression for the parameter decorator will be called as a function at runtime, with the following three arguments:
329329

330-
1. The function containing the decorated parameter.
331-
2. The ordinal index of the parameter in the function's parameter list.
330+
1. Either the constructor function of the class for a static member, or the prototype of the class for an instance member.
331+
2. The name of the member.
332+
3. The ordinal index of the parameter in the function's parameter list.
332333

333334
> NOTE  A parameter decorator can only be used to observe that a parameter has been declared on a method.
334335

0 commit comments

Comments
 (0)