Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Language service which helps to get diagnostic messages from typescript source files.

License

NotificationsYou must be signed in to change notification settings

unlight/typescript-service

Repository files navigation

Language service which helps to get diagnostic messages from typescript source files.

INSTALL

npm install --save-dev typescript-service

USAGE

import{createService}from'typescript-service';constservice=createService({ configFile, compilerOptions});constdiagnostics=service.getDiagnostics(fileName);

API

createService({ configFile: string, compilerOptions?: ts.CompilerOptions })

  • configFile (required, string) Path to tsconfig.json file
  • compilerOptions (optional, Object) Compiler options to overwrite defined in tsconfig.json

Returns object with properties which are functions:

getSourceFile({ fileName: string, sourceText?: string })

Update (add) information about file in typescript service.

  • fileName (required, string) Path to typescript file
  • sourceText (optional, string) File content of this file
getDiagnostics: (fileName: string, sourceText?: string): Array<ts.DiagnosticWithLocation>

Get diagnostic messages forfileName

  • fileName (required, string) Path to typescript file
  • sourceText (optional, string) If path outside of scope defined in tsconfig you need providesourceText
getProgram(): ts.Program

Getts.Program

CHANGELOG

SeeCHANGELOG.md

About

Language service which helps to get diagnostic messages from typescript source files.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp