Skip to content

Commit

Permalink
[PR] Fix Documentation: example code error in docs/lang/depth-subtyping
Browse files Browse the repository at this point in the history
Summary:
This fixes an error in the docs, specifically the example code in the depth-subtyping section.
Closes facebook#4415

Differential Revision: D5501874

Pulled By: samwgoldman

fbshipit-source-id: bd2df3aa5b3681dc000292a4421286585089d77e
  • Loading branch information
sstur authored and facebook-github-bot committed Jul 26, 2017
1 parent 1d2e572 commit a74b034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/en/docs/lang/depth-subtyping.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ provides a syntax for this:
class Person { name: string }
class Employee extends Person { department: string }

var employee: { who: Employee } = { prop: new Employee };
var employee: { who: Employee } = { who: new Employee };
var person: { +who: Person } = employee; // OK
// $ExpectError
person.who = new Person; // Error!
Expand Down

0 comments on commit a74b034

Please sign in to comment.