ts-morph

Language Service

Get the language service by calling:

const languageService = project.getLanguageService();

Underlying compiler object

The underlying ts.LanguageService can be retrieved as follows:

const tsLanguageService = languageService.compilerObject;

Use

Generally you won't need to use the language service because most of the functionality is exposed as methods on other objects.