docs: 订正:笔误、全角分号
This commit is contained in:
@@ -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`。
|
||||
|
||||
@@ -660,7 +660,7 @@ type ThisParameterType<T> =
|
||||
T extends (
|
||||
this: infer U,
|
||||
...args: never
|
||||
) => any ? U : unknown;
|
||||
) => any ? U : unknown;
|
||||
```
|
||||
|
||||
## `ThisType<Type>`
|
||||
|
||||
Reference in New Issue
Block a user