Skip to main content

modules/languages/diagnostics

Enumerations​

DiagnosticSeverity​

Defined in: modules/languages/diagnostics.d.ts:9

Represents the severity level of a diagnostic (error, warning, info, etc.). Directly maps to Monaco Editor's internal MarkerSeverity.

Enumeration Members​

Error​

Error: 8

Defined in: modules/languages/diagnostics.d.ts:13

Hint​

Hint: 1

Defined in: modules/languages/diagnostics.d.ts:10

Info​

Info: 2

Defined in: modules/languages/diagnostics.d.ts:11

Warning​

Warning: 4

Defined in: modules/languages/diagnostics.d.ts:12

Interfaces​

Diagnostic​

Defined in: modules/languages/diagnostics.d.ts:19

Represents a single diagnostic (problem, error, warning) within a source file.

Properties​

code?​

optional code?: string | { target: string; value: string; }

Defined in: modules/languages/diagnostics.d.ts:42

Optional error or rule code (e.g. 'no-unused-vars' or 'TS1005').

endColumn​

endColumn: number

Defined in: modules/languages/diagnostics.d.ts:36

The 1-based end column of the issue.

endLineNumber​

endLineNumber: number

Defined in: modules/languages/diagnostics.d.ts:33

The 1-based end line number of the issue.

message​

message: string

Defined in: modules/languages/diagnostics.d.ts:24

The human-readable message to display in the UI and hover tooltips.

severity​

severity: DiagnosticSeverity

Defined in: modules/languages/diagnostics.d.ts:21

The severity level of this diagnostic.

source?​

optional source?: string

Defined in: modules/languages/diagnostics.d.ts:39

Optional identifier of the tool producing this diagnostic (e.g. 'eslint', 'tsc').

startColumn​

startColumn: number

Defined in: modules/languages/diagnostics.d.ts:30

The 1-based start column of the issue.

startLineNumber​

startLineNumber: number

Defined in: modules/languages/diagnostics.d.ts:27

The 1-based start line number of the issue.


DiagnosticCollection​

Defined in: modules/languages/diagnostics.d.ts:50

A diagnostic collection is a container that manages a set of diagnostics. Collections isolate errors from different tools (e.g., ESLint vs TypeScript compiler) so they can be updated or cleared independently without interfering with each other.

Properties​

name​

readonly name: string

Defined in: modules/languages/diagnostics.d.ts:52

The display name of the collection.

Methods​

clear()​

clear(): void

Defined in: modules/languages/diagnostics.d.ts:65

Wipes all active diagnostic markers published by this specific collection instance.

Returns​

void

dispose()​

dispose(): void

Defined in: modules/languages/diagnostics.d.ts:70

Disposes the collection container and cleans up all of its registered markers from memory.

Returns​

void

set()​

set(uri, diagnostics): void

Defined in: modules/languages/diagnostics.d.ts:60

Publishes an array of diagnostics for a specific file resource path. This instantly triggers native editor squiggles and updates the Problems Panel. *

Parameters​
uri​

string

The absolute target document URI string.

diagnostics​

Diagnostic[]

The array of diagnostics to display.

Returns​

void

References​

ActivityBarItemOptions​

Re-exports ActivityBarItemOptions


app​

Re-exports app


authentication​

Re-exports authentication


BookmarkFolder​

Re-exports BookmarkFolder


CommandMetadata​

Re-exports CommandMetadata


commands​

Re-exports commands


CommitOptions​

Re-exports CommitOptions


ConfigurationProperty​

Re-exports ConfigurationProperty


CopyOptions​

Re-exports CopyOptions


Disposable​

Re-exports Disposable


DocumentSymbol​

Re-exports DocumentSymbol


ExtensionContext​

Re-exports ExtensionContext


ExtensionInfo​

Re-exports ExtensionInfo


extensions​

Re-exports extensions


FileDecoration​

Re-exports FileDecoration


FileFilter​

Re-exports FileFilter


FileStat​

Re-exports FileStat


FileSystemAPI​

Re-exports FileSystemAPI


FindOptions​

Re-exports FindOptions


fs​

Re-exports fs


git​

Re-exports git


GitBranch​

Re-exports GitBranch


GitChangedFile​

Re-exports GitChangedFile


GitCommit​

Re-exports GitCommit


GitFileStatus​

Re-exports GitFileStatus


GitHubUser​

Re-exports GitHubUser


GitRepository​

Re-exports GitRepository


GitSortMode​

Re-exports GitSortMode


GitStash​

Re-exports GitStash


IConfigurationSection​

Re-exports IConfigurationSection


IconThemeDefinition​

Re-exports IconThemeDefinition


IconThemeMap​

Re-exports IconThemeMap


InputBoxOptions​

Re-exports InputBoxOptions


languages​

Re-exports languages


lsp​

Re-exports lsp


LspServerConfig​

Re-exports LspServerConfig


Re-exports MenuItem


Re-exports menus


ModalOptions​

Re-exports ModalOptions


MSCodeUIColors​

Re-exports MSCodeUIColors


MultiPickerOptions​

Re-exports MultiPickerOptions


NotificationAction​

Re-exports NotificationAction


OutputChannel​

Re-exports OutputChannel


PickerOptions​

Re-exports PickerOptions


Position​

Re-exports Position


ProgressNotification​

Re-exports ProgressNotification


QuickPickItem​

Re-exports QuickPickItem


QuickPickOptions​

Re-exports QuickPickOptions


RecentWorkspace​

Re-exports RecentWorkspace


ReplaceOptions​

Re-exports ReplaceOptions


ResolvedIcon​

Re-exports ResolvedIcon


Re-exports search


SearchFileResult​

Re-exports SearchFileResult


SearchMatch​

Re-exports SearchMatch


Selection​

Re-exports Selection


SettingOption​

Re-exports SettingOption


SettingType​

Re-exports SettingType


SidebarPanelDef​

Re-exports SidebarPanelDef


SidebarPanelHeader​

Re-exports SidebarPanelHeader


SidebarSectionContent​

Re-exports SidebarSectionContent


SidebarSectionContext​

Re-exports SidebarSectionContext


SidebarSectionDef​

Re-exports SidebarSectionDef


SidebarState​

Re-exports SidebarState


SilentSearchOptions​

Re-exports SilentSearchOptions


StashOptions​

Re-exports StashOptions


StatusBarAlignment​

Re-exports StatusBarAlignment


StatusBarItemController​

Re-exports StatusBarItemController


StatusBarItemOptions​

Re-exports StatusBarItemOptions


SymbolKind​

Re-exports SymbolKind


SymbolProvider​

Re-exports SymbolProvider


Tab​

Re-exports Tab


TabDiffData​

Re-exports TabDiffData


TabOptions​

Re-exports TabOptions


TabType​

Re-exports TabType


TaskExecution​

Re-exports TaskExecution


TaskOptions​

Re-exports TaskOptions


tasks​

Re-exports tasks


Terminal​

Re-exports Terminal


TerminalExitStatus​

Re-exports TerminalExitStatus


TerminalOptions​

Re-exports TerminalOptions


termis​

Re-exports termis


TermisView​

Re-exports TermisView


TextDocument​

Re-exports TextDocument


TextEditor​

Re-exports TextEditor


TextEditorEdit​

Re-exports TextEditorEdit


TextEditorOptions​

Re-exports TextEditorOptions


ThemeDefinition​

Re-exports ThemeDefinition


themes​

Re-exports themes


TokenColor​

Re-exports TokenColor


TreeDataProvider​

Re-exports TreeDataProvider


TreeItem​

Re-exports TreeItem


TreeView​

Re-exports TreeView


TreeViewOptions​

Re-exports TreeViewOptions


window​

Re-exports window


workspace​

Re-exports workspace


WorkspaceConfiguration​

Re-exports WorkspaceConfiguration


WorkspaceFolder​

Re-exports WorkspaceFolder


WriteOptions​

Re-exports WriteOptions