Skip to content

Commit fe3b970

Browse files
authored
Merge pull request microsoft#643 from NicBright/patch-4
Fix incorrect documentation
2 parents 26bbbe5 + b3f4b90 commit fe3b970

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pages/Declaration Merging.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ interface Box {
4646
let box: Box = {height: 5, width: 6, scale: 10};
4747
```
4848

49-
Non-function members of the interfaces must be unique.
50-
The compiler will issue an error if the interfaces both declare a non-function member of the same name.
49+
Non-function members of the interfaces should be unique.
50+
If they are not unique, they must be of the same type.
51+
The compiler will issue an error if the interfaces both declare a non-function member of the same name, but of different types.
5152

5253
For function members, each function member of the same name is treated as describing an overload of the same function.
5354
Of note, too, is that in the case of interface `A` merging with later interface `A`, the second interface will have a higher precedence than the first.

0 commit comments

Comments
 (0)