Mastering TypeScript 3
上QQ阅读APP看书,第一时间看更新

Summary

In this chapter, we took a look at TypeScript's basic types, variables, and function techniques. We saw how TypeScript introduces syntactic sugar on top of normal JavaScript code to ensure strongly typed variables and function signatures. We also saw how TypeScript uses duck typing and explicit casting, and then discussed TypeScript functions, function signatures, and overrides. We completed the chapter with a discussion on advanced type techniques, including type guards, object rest and spread, tuples, and bigint.

In the next chapter, we will build on this knowledge and see how TypeScript extends these strongly typed rules into object-oriented concepts, such as interfaces, classes, and inheritance.