diff --git a/09_type_compatibility.md b/09_type_compatibility.md index 45799b9..c2c58d8 100644 --- a/09_type_compatibility.md +++ b/09_type_compatibility.md @@ -120,8 +120,8 @@ x = y; // 没有问题 // TSError: ⨯ Unable to compile TypeScript // src/main.ts (6,1): Type '() => { name: string; }' is not assignable to type '() => { name: string; location: string; }'. -// Type '{ name: string; }' is not assignable to type '{ name: string; location: string; }'. -// Property 'location' is missing in type '{ name: string; }'. (2322) +// Type '{ name: string; }' is not assignable to type '{ name: string; location: string; }'. +// Property 'location' is missing in type '{ name: string; }'. (2322) y = x; // 错误,因为`x`缺少一个location属性 ```