Last active
April 13, 2019 00:15
-
-
Save rileyhilliard/3e73ec9b98cc75793969b1de9b9756e1 to your computer and use it in GitHub Desktop.
Class Error Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of a class instantiation that is missing | |
// required class constructor object properties | |
import Person from 'person'; | |
// Create a new person that is missing required object structures | |
const jane = new Person ({ | |
first: 'Jane', | |
// Type Error! Property 'last' is missing | |
// Type Error! Property 'geo' is missing | |
}); | |
jane.whoAmI(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment