mirror of
https://github.com/gnu4cn/ts-learnings.git
synced 2024-12-26 12:50:31 +08:00
Test links in .md file.
This commit is contained in:
parent
618df2aab9
commit
9973d78092
@ -42,6 +42,7 @@ function sealed(target) {
|
||||
> 注意:在下面的[类装饰器](#class-decorators)中,可以看到更详细的示例
|
||||
|
||||
### 装饰器工厂(Decorator Factories)
|
||||
<a href="decorator-factories"></a>
|
||||
|
||||
可通过编写一个装饰器工厂,来对装饰器作用于声明的方式进行定制。 *装饰器工厂* 就是一个返回由装饰器在运行时调用的表达式的函数(If you want to customize how a decorator is applied to a declaration, we can write a decorator factory. A *Decorator Factory* is simply a function that returns the expression that will be called by the decorator at runtime)。
|
||||
|
||||
@ -343,4 +344,4 @@ function getFormat (target: any, propertyKey: string) {
|
||||
}
|
||||
```
|
||||
|
||||
这里的装饰器 `@format("Hello, %s")`是一个 [装饰器工厂](#装饰器工厂(Decorator Factories))
|
||||
这里的装饰器 `@format("Hello, %s")`是一个 [装饰器工厂](#decorator-factories)
|
||||
|
Loading…
Reference in New Issue
Block a user