1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

Merge pull request #1144 from w-l-l/patch-4

docs(decorator): fix typo
This commit is contained in:
Ruan YiFeng 2022-12-07 19:19:02 +08:00 committed by GitHub
commit 1623fdc9f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -273,7 +273,7 @@ C.prototype.toString = trace(C.prototype.toString);
上面示例中,`@trace`装饰`toString()`方法,就相当于修改了该方法。
装饰器使用 TypeScript 描述类型如下。
装饰器使用 TypeScript 描述类型如下。
```typescript
type ClassMethodDecorator = (value: Function, context: {