@shopify/theme-language-server-common
Version:
<h1 align="center" style="position: relative;" > <br> <img src="https://github.com/Shopify/theme-check-vscode/blob/main/images/shopify_glyph.png?raw=true" alt="logo" width="141" height="160"> <br> Theme Language Server </h1>
25 lines (24 loc) • 753 B
TypeScript
import { Offense } from '@shopify/theme-check-common';
import { Connection, Diagnostic, URI } from 'vscode-languageserver';
/**
* Anomalies are used to represent both the diagnostic and offense in a
* single type. That way we can make codeAction associations easily.
*/
export type Anomaly = {
offense: Offense;
diagnostic: Diagnostic;
id: number;
};
export type Diagnostics = {
uri: string;
version: number | undefined;
anomalies: Anomaly[];
};
export declare class DiagnosticsManager {
private connection;
private diagnostics;
constructor(connection: Connection);
get(uri: URI): Diagnostics | undefined;
set(uri: URI, version: number | undefined, offenses: Offense[]): void;
clear(uri: URI): void;
}