Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lsif-protocol

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lsif-protocol - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0-next.1

227

lib/protocol.d.ts

@@ -22,2 +22,3 @@ import * as lsp from 'vscode-languageserver-protocol';

metaData = "metaData",
event = "$event",
project = "project",

@@ -50,2 +51,39 @@ range = "range",

/**
* The event kinds
*/
export declare enum EventKind {
begin = "begin",
end = "end"
}
/**
* The event scopes
*/
export declare enum EventScope {
project = "project",
document = "document"
}
export interface Event extends V {
label: VertexLabels.event;
/**
* The event kind.
*/
kind: EventKind;
/**
* The event scope.
*/
scope: EventScope;
}
export interface ProjectEvent extends Event {
/**
* The id of the project vertex.
*/
data: Id;
}
export interface DocumentEvent extends Event {
/**
* The id of the document vertex.
*/
data: Id;
}
/**
* A result set acts as a hub to share n LSP request results

@@ -227,3 +265,3 @@ * between different ranges.

*/
projectRoot?: string;
projectRoot?: Uri;
/**

@@ -237,13 +275,3 @@ * Information about the tool that created the dump

}
export declare type AdditionDataValueType = string | number | boolean | string[] | number[] | boolean[];
export interface AdditionalData {
[key: string]: AdditionDataValueType | AdditionalData | AdditionalData[];
}
/**
* A document tag allows Indexers to tag documents for special
* purposes
*/
export interface ProjectData extends AdditionalData {
}
/**
* A project vertex.

@@ -266,6 +294,2 @@ */

/**
* Optional project data specific to the programming language.
*/
data?: ProjectData;
/**
* Optional the content of the project file, `base64` encoded.

@@ -275,8 +299,2 @@ */

}
/**
* A document tag allows Indexers to tag documents for special
* purposes
*/
export interface DocumentData extends AdditionalData {
}
export declare type DocumentId = Id;

@@ -301,6 +319,2 @@ /**

/**
* Optional document data specific to the programming language.
*/
data?: DocumentData;
/**
* Optional the content of the document, `based64` encoded

@@ -326,6 +340,2 @@ */

/**
* The moniker kind.
*/
kind: MonikerKind;
/**
* The scheme of the moniker. For example tsc or .Net

@@ -339,2 +349,6 @@ */

identifier: string;
/**
* The moniker kind if known.
*/
kind?: MonikerKind;
}

@@ -354,3 +368,3 @@ export interface PackageInformation extends V {

*/
uri?: string;
uri?: Uri;
/**

@@ -448,6 +462,2 @@ * Optional the content of the document, `based64` encoded

label: VertexLabels.declarationResult;
/**
* The actual result.
*/
result?: (RangeId | lsp.Location)[];
}

@@ -462,6 +472,2 @@ /**

label: VertexLabels.definitionResult;
/**
* The actual result.
*/
result?: (RangeId | lsp.Location)[];
}

@@ -476,28 +482,4 @@ /**

label: VertexLabels.typeDefinitionResult;
/**
* The actual result.
*/
result?: (RangeId | lsp.Location)[];
}
/**
* A vertex representing a Hover.
*
* Extends the `Hover` type defined in LSP.
*/
export interface HoverResult extends V {
/**
* The label property.
*/
label: VertexLabels.hoverResult;
/**
* The hover result. This is the normal LSP hover result.
*/
result: lsp.Hover;
}
/**
* The id type of a reference result is a normal id.
*/
export declare type ReferenceResultId = Id;
export declare type ReferenceResultItem = (RangeId | lsp.Location);
/**
* A vertex representing a reference result.

@@ -510,33 +492,4 @@ */

label: VertexLabels.referenceResult;
/**
* The declarations belonging to the reference result.
*/
declarations?: ReferenceResultItem[];
/**
* The definitions belonging to the reference result.
*/
definitions?: ReferenceResultItem[];
/**
* The references belonging to the reference result.
*/
references?: ReferenceResultItem[];
/**
* The reference results belonging to this reference result.
*/
referenceResults?: ReferenceResultId[];
}
export declare namespace ReferenceResult {
function isStatic(result: ReferenceResult): result is ((ReferenceResult & {
referenceResults: ReferenceResultId[];
}) | (ReferenceResult & {
declarations: ReferenceResultItem[];
definitions: ReferenceResultItem[];
references: ReferenceResultItem[];
}));
}
/**
* The id type of an implementation result is a normal id.
*/
export declare type ImplementationResultId = Id;
/**
* A vertex representing an implementation result.

@@ -549,10 +502,17 @@ */

label: VertexLabels.implementationResult;
}
/**
* A vertex representing a Hover.
*
* Extends the `Hover` type defined in LSP.
*/
export interface HoverResult extends V {
/**
* The ranges and locations belong to the implementation result.
* The label property.
*/
result?: (RangeId | lsp.Location)[];
label: VertexLabels.hoverResult;
/**
* The other implementation results belonging to this result.
* The hover result. This is the normal LSP hover result.
*/
implementationResults?: ImplementationResultId[];
result: lsp.Hover;
}

@@ -562,7 +522,7 @@ /**

*/
export declare type Vertex = MetaData | Project | Document | Moniker | PackageInformation | ResultSet | Range | DocumentSymbolResult | FoldingRangeResult | DocumentLinkResult | DiagnosticResult | DefinitionResult | DeclarationResult | TypeDefinitionResult | HoverResult | ReferenceResult | ImplementationResult;
export declare type Vertex = MetaData | ProjectEvent | DocumentEvent | Project | Document | Moniker | PackageInformation | ResultSet | Range | DocumentSymbolResult | FoldingRangeResult | DocumentLinkResult | DiagnosticResult | DefinitionResult | DeclarationResult | TypeDefinitionResult | HoverResult | ReferenceResult | ImplementationResult;
export declare enum EdgeLabels {
contains = "contains",
item = "item",
refersTo = "refersTo",
next = "next",
moniker = "moniker",

@@ -586,3 +546,3 @@ packageInformation = "packageInformation",

*/
export interface E<S extends V, T extends V, K extends EdgeLabels> extends Element {
export interface E11<S extends V, T extends V, K extends EdgeLabels> extends Element {
_?: [S, T];

@@ -601,2 +561,17 @@ id: Id;

}
export interface E1N<S extends V, T extends V, K extends EdgeLabels> extends Element {
_?: [S, T];
id: Id;
type: ElementTypes.edge;
label: K;
/**
* The id of the from vertex.
*/
outV: Id;
/**
* The ids of the to vertices.
*/
inVs: Id[];
}
export declare type E<S extends V, T extends V, K extends EdgeLabels> = E11<S, T, K> | E1N<S, T, K>;
export declare enum ItemEdgeProperties {

@@ -609,3 +584,4 @@ declarations = "declarations",

}
export interface ItemEdge<S extends V, T extends V> extends E<S, T, EdgeLabels.item> {
export interface ItemEdge<S extends V, T extends V> extends E1N<S, T, EdgeLabels.item> {
document: Id;
property?: ItemEdgeProperties;

@@ -620,3 +596,3 @@ }

*/
export declare type contains = E<Project, Document, EdgeLabels.contains> | E<Document, Range, EdgeLabels.contains>;
export declare type contains = E1N<Project, Document, EdgeLabels.contains> | E1N<Document, Range, EdgeLabels.contains>;
/**

@@ -626,13 +602,12 @@ * An edge associating a range with a result set. The relationship exists between:

* - `Range` -> `ResultSet`
* - `ResultSet` -> `ResultSet`
*/
export declare type refersTo = E<Range, ResultSet, EdgeLabels.refersTo>;
export declare type next = E11<Range, ResultSet, EdgeLabels.next>;
/**
* An edge representing a item in a result set. The relationship exists between:
*
* - `ReferenceResult` -> `Range`
* - `ReferenceResult` -> `ReferenceResult`
* - `ExportResult` -> `ExportResultItem`
* - `ExternalImportResult` -> `ExternalImportItem`
* - `ReferenceResult` -> `Range[]`
* - `ReferenceResult` -> `ReferenceResult[]`
*/
export declare type item = ItemEdge<ReferenceResult, Range> | ItemEdge<ReferenceResult, ReferenceResult> | ItemEdge<ImplementationResult, Range> | ItemEdge<ImplementationResult, ImplementationResult>;
export declare type item = ItemEdge<DeclarationResult, Range> | ItemEdge<DefinitionResult, Range> | ItemEdge<TypeDefinitionResult, Range> | ItemEdge<ReferenceResult, Range> | ItemEdge<ReferenceResult, ReferenceResult> | ItemEdge<ImplementationResult, Range> | ItemEdge<ImplementationResult, ImplementationResult>;
/**

@@ -642,4 +617,10 @@ * An edge associating a range with a moniker. The relationship exists between:

* - `Range` -> `Moniker`
* - `ResultSet` -> `Moniker`
* - `DeclarationResult` -> `Moniker`
* - `DefinitionResult` -> `Moniker`
* - `TypeDefinitionResult` -> `Moniker`
* - `ReferenceResult` -> `Moniker`
* - `ImplementationResult` -> `Moniker`
*/
export declare type moniker = E<Range, Moniker, EdgeLabels.moniker>;
export declare type moniker = E11<Range, Moniker, EdgeLabels.moniker> | E11<ResultSet, Moniker, EdgeLabels.moniker> | E11<DeclarationResult, Moniker, EdgeLabels.moniker> | E11<DefinitionResult, Moniker, EdgeLabels.moniker> | E11<TypeDefinitionResult, Moniker, EdgeLabels.moniker> | E11<ReferenceResult, Moniker, EdgeLabels.moniker> | E11<ImplementationResult, Moniker, EdgeLabels.moniker>;
/**

@@ -650,3 +631,3 @@ * An edge associating a moniker with a package information. The relationship exists between:

*/
export declare type packageInformation = E<Moniker, PackageInformation, EdgeLabels.packageInformation>;
export declare type packageInformation = E11<Moniker, PackageInformation, EdgeLabels.packageInformation>;
/**

@@ -657,3 +638,3 @@ * An edge representing a `textDocument/documentSymbol` relationship. The relationship exists between:

*/
export declare type textDocument_documentSymbol = E<Document, DocumentSymbolResult, EdgeLabels.textDocument_documentSymbol>;
export declare type textDocument_documentSymbol = E11<Document, DocumentSymbolResult, EdgeLabels.textDocument_documentSymbol>;
/**

@@ -664,3 +645,3 @@ * An edge representing a `textDocument/foldingRange` relationship. The relationship exists between:

*/
export declare type textDocument_foldingRange = E<Document, FoldingRangeResult, EdgeLabels.textDocument_foldingRange>;
export declare type textDocument_foldingRange = E11<Document, FoldingRangeResult, EdgeLabels.textDocument_foldingRange>;
/**

@@ -671,3 +652,3 @@ * An edge representing a `textDocument/documentLink` relationship. The relationship exists between:

*/
export declare type textDocument_documentLink = E<Document, DocumentLinkResult, EdgeLabels.textDocument_documentLink>;
export declare type textDocument_documentLink = E11<Document, DocumentLinkResult, EdgeLabels.textDocument_documentLink>;
/**

@@ -679,3 +660,3 @@ * An edge representing a `textDocument/diagnostic` relationship. The relationship exists between:

*/
export declare type textDocument_diagnostic = E<Project, DiagnosticResult, EdgeLabels.textDocument_diagnostic> | E<Document, DiagnosticResult, EdgeLabels.textDocument_diagnostic>;
export declare type textDocument_diagnostic = E11<Project, DiagnosticResult, EdgeLabels.textDocument_diagnostic> | E11<Document, DiagnosticResult, EdgeLabels.textDocument_diagnostic>;
/**

@@ -687,3 +668,3 @@ * An edge representing a declaration relationship. The relationship exists between:

*/
export declare type textDocument_declaration = E<Range, DeclarationResult, EdgeLabels.textDocument_declaration> | E<ResultSet, DeclarationResult, EdgeLabels.textDocument_declaration>;
export declare type textDocument_declaration = E11<Range, DeclarationResult, EdgeLabels.textDocument_declaration> | E11<ResultSet, DeclarationResult, EdgeLabels.textDocument_declaration>;
/**

@@ -695,3 +676,3 @@ * An edge representing a definition relationship. The relationship exists between:

*/
export declare type textDocument_definition = E<Range, DefinitionResult, EdgeLabels.textDocument_definition> | E<ResultSet, DefinitionResult, EdgeLabels.textDocument_definition>;
export declare type textDocument_definition = E11<Range, DefinitionResult, EdgeLabels.textDocument_definition> | E11<ResultSet, DefinitionResult, EdgeLabels.textDocument_definition>;
/**

@@ -703,3 +684,3 @@ * An edge representing a type definition relations ship. The relationship exists between:

*/
export declare type textDocument_typeDefinition = E<Range, TypeDefinitionResult, EdgeLabels.textDocument_typeDefinition> | E<ResultSet, TypeDefinitionResult, EdgeLabels.textDocument_typeDefinition>;
export declare type textDocument_typeDefinition = E11<Range, TypeDefinitionResult, EdgeLabels.textDocument_typeDefinition> | E11<ResultSet, TypeDefinitionResult, EdgeLabels.textDocument_typeDefinition>;
/**

@@ -711,3 +692,3 @@ * An edge representing a hover relationship. The relationship exists between:

*/
export declare type textDocument_hover = E<Range, HoverResult, EdgeLabels.textDocument_hover> | E<ResultSet, HoverResult, EdgeLabels.textDocument_hover>;
export declare type textDocument_hover = E11<Range, HoverResult, EdgeLabels.textDocument_hover> | E11<ResultSet, HoverResult, EdgeLabels.textDocument_hover>;
/**

@@ -719,3 +700,3 @@ * An edge representing a references relationship. The relationship exists between:

*/
export declare type textDocument_references = E<Range, ReferenceResult, EdgeLabels.textDocument_references> | E<ResultSet, ReferenceResult, EdgeLabels.textDocument_references>;
export declare type textDocument_references = E11<Range, ReferenceResult, EdgeLabels.textDocument_references> | E11<ResultSet, ReferenceResult, EdgeLabels.textDocument_references>;
/**

@@ -727,3 +708,3 @@ * An edge representing a implementation relationship. The relationship exists between:

*/
export declare type textDocument_implementation = E<Range, ImplementationResult, EdgeLabels.textDocument_implementation> | E<ResultSet, ImplementationResult, EdgeLabels.textDocument_implementation>;
export declare type textDocument_implementation = E11<Range, ImplementationResult, EdgeLabels.textDocument_implementation> | E11<ResultSet, ImplementationResult, EdgeLabels.textDocument_implementation>;
/**

@@ -733,2 +714,10 @@ *

*/
export declare type Edge = contains | item | refersTo | moniker | packageInformation | textDocument_documentSymbol | textDocument_foldingRange | textDocument_documentLink | textDocument_diagnostic | textDocument_definition | textDocument_typeDefinition | textDocument_hover | textDocument_references | textDocument_implementation;
export declare type Edge = contains | item | next | moniker | packageInformation | textDocument_documentSymbol | textDocument_foldingRange | textDocument_documentLink | textDocument_diagnostic | textDocument_declaration | textDocument_definition | textDocument_typeDefinition | textDocument_hover | textDocument_references | textDocument_implementation;
export declare namespace Edge {
function is11(edge: Edge): edge is (Edge & {
inV: Id;
});
function is1N(edge: Edge): edge is (Edge & {
inVs: Id[];
});
}

@@ -18,2 +18,3 @@ "use strict";

VertexLabels["metaData"] = "metaData";
VertexLabels["event"] = "$event";
VertexLabels["project"] = "project";

@@ -38,2 +39,18 @@ VertexLabels["range"] = "range";

/**
* The event kinds
*/
var EventKind;
(function (EventKind) {
EventKind["begin"] = "begin";
EventKind["end"] = "end";
})(EventKind = exports.EventKind || (exports.EventKind = {}));
/**
* The event scopes
*/
var EventScope;
(function (EventScope) {
EventScope["project"] = "project";
EventScope["document"] = "document";
})(EventScope = exports.EventScope || (exports.EventScope = {}));
/**
* All know range tag literal types.

@@ -62,10 +79,2 @@ */

})(MonikerKind = exports.MonikerKind || (exports.MonikerKind = {}));
var ReferenceResult;
(function (ReferenceResult) {
function isStatic(result) {
return (result.declarations !== undefined && result.definitions !== undefined && result.references !== undefined)
|| result.referenceResults !== undefined;
}
ReferenceResult.isStatic = isStatic;
})(ReferenceResult = exports.ReferenceResult || (exports.ReferenceResult = {}));
var EdgeLabels;

@@ -75,3 +84,3 @@ (function (EdgeLabels) {

EdgeLabels["item"] = "item";
EdgeLabels["refersTo"] = "refersTo";
EdgeLabels["next"] = "next";
EdgeLabels["moniker"] = "moniker";

@@ -98,2 +107,15 @@ EdgeLabels["packageInformation"] = "packageInformation";

})(ItemEdgeProperties = exports.ItemEdgeProperties || (exports.ItemEdgeProperties = {}));
var Edge;
(function (Edge) {
function is11(edge) {
let candidate = edge;
return candidate && candidate.inV !== undefined;
}
Edge.is11 = is11;
function is1N(edge) {
let candidate = edge;
return candidate && Array.isArray(candidate.inVs);
}
Edge.is1N = is1N;
})(Edge = exports.Edge || (exports.Edge = {}));
//# sourceMappingURL=protocol.js.map
{
"name": "lsif-protocol",
"description": "Typescript implementation of the LSIF protocol",
"version": "0.3.1",
"version": "0.4.0-next.1",
"author": "Microsoft Corporation",

@@ -6,0 +6,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc