Skip to content

Instantly share code, notes, and snippets.

@rileyhilliard
Last active April 13, 2019 00:15
Show Gist options
  • Save rileyhilliard/3e73ec9b98cc75793969b1de9b9756e1 to your computer and use it in GitHub Desktop.
Save rileyhilliard/3e73ec9b98cc75793969b1de9b9756e1 to your computer and use it in GitHub Desktop.
Class Error Example
// 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