We begin the discussion of object-oriented programming by discussing the syntax and use of object literals. Object literals are not instances of classes; they stand on their own.
- [Instructor] Let's turn our attention…to object literals, classes, and interfaces.…Traditionally, for JavaScript programmers,…this is the hard part, but as C# programmers,…this is our bread and butter.…TypeScript supports the creation of object literals.…Notice that this object literal defines two properties…with their values, but also defines a method area,…which returns the height times the width.…The type of this object literal is inferred.…Or you can explicitly define the rectangle…to be of typed object and notice the capital O.…
Released
1/5/2017In this course, Jesse Liberty reviews the fundamentals of TypeScript for the C# developer, including the built-in types, flow controls, and functions. He covers default, optional, and rest parameters; lambda functions; object literals; and the creation and use of custom classes. Plus, learn about other object-oriented features such as inheritance and interfaces. By the end of the course, C# developers should be well on their way to incorporating this flexible and powerful web programming language into their app development workflow.
- Setting up a TypeScript development environment
- Working with types and variables
- Using operators to control flow
- Working with parameters and functions
- Creating classes and objects
- Exploring TypeScript inheritance
- Working with interfaces
Share this video
Embed this video
Video: Object literals