Skip to Content
Learning TypeScript 2.x - Second Edition
book

Learning TypeScript 2.x - Second Edition

by Remo H. Jansen
April 2018
Beginner content levelBeginner
536 pages
13h 21m
English
Packt Publishing
Content preview from Learning TypeScript 2.x - Second Edition

Accessing the language services API

The language services API is built on top of the core compiler APIs, and it was designed to provide software engineers with a great developer experience independent of their IDE or code editor of choice.

We are going to use ts-simple-ast to access the language services API. We can access the language services API using the getLanguageService method in an AST instance:

myAst.getLanguageService(); 

The language services API implements methods that allow us to perform a common editing task, such as renaming a variable or automatically implementing an interface. The following screenshot shows some of the available methods in the language services API:

We are now going to create a very small application that ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering TypeScript - Fourth Edition

Mastering TypeScript - Fourth Edition

Nathan Rozentals
Learning TypeScript

Learning TypeScript

Josh Goldberg
TypeScript for Beginners

TypeScript for Beginners

Bharath Thippireddy

Publisher Resources

ISBN: 9781788391474Supplemental Content