mirror of
https://github.com/wangdoc/typescript-tutorial.git
synced 2025-12-20 00:50:17 +08:00
Merge pull request #132 from wjw020206/patch-1
Some checks failed
TypeScript tutorial CI / Generating pages (push) Has been cancelled
Some checks failed
TypeScript tutorial CI / Generating pages (push) Has been cancelled
docs(object): fixed typo
This commit is contained in:
@@ -228,7 +228,7 @@ let lastName = user.lastName ?? 'Bar';
|
||||
TypeScript 提供编译设置`ExactOptionalPropertyTypes`,只要同时打开这个设置和`strictNullChecks`,可选属性就不能设为`undefined`。
|
||||
|
||||
```typescript
|
||||
// 打开 ExactOptionsPropertyTypes 和 strictNullChecks
|
||||
// 打开 ExactOptionalPropertyTypes 和 strictNullChecks
|
||||
const obj: {
|
||||
x: number;
|
||||
y?: number;
|
||||
|
||||
Reference in New Issue
Block a user