OptionalformatSettings: tsc.FormatCodeSettingsOptionalformatSettings: tsc.FormatCodeSettingsOptionalformatSettings: tsc.FormatCodeSettingsThis is used as a part of restarting the language service.
OptionalprovidePrefixAndSuffixTextForRename: booleanOptionaltriggerReason: tsc.RefactorTriggerReasonOptionalkind: stringOptionalincludeInteractiveActions: booleanInclude refactor actions that require additional arguments to be
passed when calling getEditsForRefactor. When true, clients should inspect the isInteractive
property of each returned RefactorActionInfo and ensure they are able to collect the appropriate
arguments for any interactive action before offering it.
Gets global diagnostics related to the program configuration and compiler options.
Gets the extended details for a completion entry retrieved from getCompletionsAtPosition.
The path to the file
A zero based index of the character where you want the entries
The name from an existing completion which came from getCompletionsAtPosition
How should code samples in the completions be formatted, can be undefined for backwards compatibility
source property from the completion entry
User settings, can be undefined for backwards compatibility
data property from the completion entry
Gets completion entries at a particular position in a file.
The path to the file
A zero-based index of the character where you want the entries
An object describing how the request was triggered and what kinds of code actions can be returned with the completions.
OptionalformattingSettings: tsc.FormatCodeSettingssettings needed for calling formatting functions.
Optionaloptions: DocCommentTemplateOptionsOptionalformatOptions: tsc.FormatCodeSettingsOptionalinteractiveRefactorArguments: InteractiveRefactorArgumentsOptionalemitOnlyDtsFiles: booleanOptionalforceDtsEmit: booleanGets semantic highlights information for a particular file. Has two formats, an older version used by VS and a format used by VS Code.
The path to the file
Optionalformat: SemanticClassificationFormatWhich format to use, defaults to "original"
a number array encoded as triples of [start, length, ClassificationType, ...].
Encoded as triples of [start, length, ClassificationType].
This will return a defined result if the position is after the > of the opening tag, or somewhere in the text, of a JSXElement with no closing tag.
Editors should call this after > is typed.
OptionaltriggerReason: tsc.RefactorTriggerReasonOptionalkind: stringOptionalmaxResultCount: numberOptionalfileName: stringOptionalexcludeDtsFiles: booleanOptionalexcludeLibFiles: booleanGets semantic information about the identifier at a particular position in a file. Quick info is what you typically see when you hover in an editor.
The path to the file
A zero-based index of the character where you want the quick info
Optionaloptions: RenameInfoOptionsGets warnings or errors indicating type system issues in a given file. Requesting semantic diagnostics may start up the type system and run deferred work, so the first call may take longer than subsequent calls.
Unlike the other get*Diagnostics functions, these diagnostics can potentially not include a reference to a source file. Specifically, the first time this is called, it will return global diagnostics with no associated location.
To contrast the differences between semantic and syntactic diagnostics, consider the sentence: "The sun is green." is syntactically correct; those are real English words with correct sentence structure. However, it is semantically invalid, because it is not true.
A path to the file you want semantic diagnostics for
Gets suggestion diagnostics for a specific file. These diagnostics tend to proactively suggest refactors, as opposed to diagnostics that indicate potentially incorrect runtime behavior.
A path to the file you want semantic diagnostics for
OptionalfileName: stringGets errors indicating invalid syntax in a file.
In English, "this cdeo have, erorrs" is syntactically invalid because it has typos,
grammatical errors, and misplaced punctuation. Likewise, examples of syntax
errors in TypeScript are missing parentheses in an if statement, mismatched
curly braces, and using a reserved keyword as a variable name.
These diagnostics are inexpensive to compute and don't require knowledge of
other files. Note that a non-empty result increases the likelihood of false positives
from getSemanticDiagnostics.
While these represent the majority of syntax-related diagnostics, there are some
that require the type system, which will be present in getSemanticDiagnostics.
A path to the file you want syntactic diagnostics for
Optionalto
Deprecated
fileNamewill be ignored