Skip to content

Commit a3cbd8d

Browse files
committed
Add more information to the draft
1 parent 77b25d4 commit a3cbd8d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: draft/object-types.md

+4
Original file line numberDiff line numberDiff line change
@@ -563,12 +563,16 @@ It produces this AST
563563
Two way type checking:
564564

565565
1. going from the value and checking the type definition
566+
easier to find if the object literal has attributes that are not in the type definition
566567
2. going from the type definition and checking the value properties
568+
easier to find what's missing in the object literal to match the type definition
567569

568570
Check phases
569571

570572
1. Any property type mismatch should generate this error
571573

574+
- If they don't share the same type. e.g. `number` and `object`
575+
572576
```
573577
Type {X} is not assignable to {Y}
574578
```

0 commit comments

Comments
 (0)