![]() To get a basic understanding of Compiler API, a couple of simple tasks are shown below. On the official wiki page, there are a number of examples that illustrate the rich features provided by the API. TypeChecker: extract type information from nodes in the AST.CompilerHost: represents the operation system, with API to access external resources i.e.SourceFile: contains a representation of the source code text, we can also extract the abstract syntax tree (AST) from it.Program: represents the application, which contains all source files as well as type definition files.npm install -g typescript npm install -D explained in Part 1 of the article, a few key concepts for Compiler API are: ![]() ![]() To start using the compiler API, you need to install the “typescript” module. The compiler API exposes extremely powerful tools to process TypeScript code programmatically and makes it straightforward to build automation tools or create your own custom linter. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |