Merge pull request #75 from alex12306/main

docs: 订正:笔误、全角分号
This commit is contained in:
Ruan YiFeng
2023-08-31 13:21:15 +08:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -113,7 +113,7 @@ type MyObj = {
上面示例中,`[p in string]`就是属性名索引形式`[p: string]`的映射写法。
通过映射,可以某个对象的所有属性改成可选属性。
通过映射,可以某个对象的所有属性改成可选属性。
```typescript
type A = {
@@ -262,7 +262,7 @@ type B = {
type B = {
fooID: number;
barID: number;
}
};
```
上面示例中,类型`B`是类型`A`的映射,但在映射时把属性名改掉了,在原始属性名后面加上了字符串`ID`

View File

@@ -660,7 +660,7 @@ type ThisParameterType<T> =
T extends (
this: infer U,
...args: never
) => any ? U : unknown
) => any ? U : unknown;
```
## `ThisType<Type>`