上QQ阅读APP看书,第一时间看更新
Interface compilation
Interfaces are a compile-time language feature of TypeScript, and the compiler does not generate any JavaScript code from interfaces that you include in your TypeScript projects. Interfaces are only used by the compiler for type checking during the compilation step.
In this book, we will be sticking to a simple naming convention for interfaces, which is to prefix the interface name with the letter I. Using this naming scheme helps when dealing with large projects where code is spread across multiple files. Seeing anything prefixed with I in your code helps you distinguish it as an interface immediately. You can, however, use any naming standard for your interfaces.