Skip to content

Commit 2b90cf4

Browse files
committed
remove property decorator misleading line
1 parent 94893cc commit 2b90cf4

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

pages/Decorators.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,9 @@ The expression for the property decorator will be called as a function at runtim
294294
2. The name of the member.
295295

296296
> NOTE  A *Property Descriptor* is not provided as an argument to a property decorator due to how property decorators are initialized in TypeScript.
297-
This is because there is currently no mechanism to describe an instance property when defining members of a prototype, and no way to observe or modify the initializer for a property.
297+
This is because there is currently no mechanism to describe an instance property when defining members of a prototype, and no way to observe or modify the initializer for a property. The return value is ignored too.
298298
As such, a property decorator can only be used to observe that a property of a specific name has been declared for a class.
299299

300-
If the property decorator returns a value, it will be used as the *Property Descriptor* for the member.
301-
302-
> NOTE  The return value is ignored if your script target is less than `ES5`.
303-
304300
We can use this information to record metadata about the property, as in the following example:
305301

306302
```ts

0 commit comments

Comments
 (0)