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

vscode-languageserver-types

Package Overview
Dependencies
Maintainers
8
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-languageserver-types - npm Package Compare versions

Comparing version 3.13.0 to 3.14.0

186

lib/esm/main.d.ts

@@ -117,2 +117,48 @@ /**

/**
* Represents the connection of two locations. Provides additional metadata over normal [locations](#Location),
* including an origin range.
*/
export interface LocationLink {
/**
* Span of the origin of this link.
*
* Used as the underlined span for mouse definition hover. Defaults to the word range at
* the definition position.
*/
originSelectionRange?: Range;
/**
* The target resource identifier of this link.
*/
targetUri: string;
/**
* The full target range of this link. If the target for example is a symbol then target range is the
* range enclosing this symbol not including leading/trailing whitespace but everything else
* like comments. This information is typically used to highlight the range in the editor.
*/
targetRange: Range;
/**
* The range that should be selected and revealed when this link is being followed, e.g the name of a function.
* Must be contained by the the `targetRange`. See also `DocumentSymbol#range`
*/
targetSelectionRange: Range;
}
/**
* The LocationLink namespace provides helper functions to work with
* [LocationLink](#LocationLink) literals.
*/
export declare namespace LocationLink {
/**
* Creates a LocationLink literal.
* @param targetUri The definition's uri.
* @param targetRange The full range of the definition.
* @param targetSelectionRange The span of the symbol definition at the target.
* @param originSelectionRange The span of the symbol being defined in the originating source file.
*/
function create(targetUri: string, targetRange: Range, targetSelectionRange: Range, originSelectionRange?: Range): LocationLink;
/**
* Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
*/
function is(value: any): value is LocationLink;
}
/**
* Represents a color in RGBA space.

@@ -336,3 +382,3 @@ */

/**
* The diagnostic's code, which might appear in the user interface.
* The diagnostic's code, which usually appear in the user interface.
*/

@@ -342,7 +388,8 @@ code?: number | string;

* A human-readable string describing the source of this
* diagnostic, e.g. 'typescript' or 'super lint'.
* diagnostic, e.g. 'typescript' or 'super lint'. It usually
* appears in the user interface.
*/
source?: string;
/**
* The diagnostic's message.
* The diagnostic's message. It usually appears in the user interface
*/

@@ -468,9 +515,33 @@ message: string;

}
interface ResourceOperation {
kind: string;
}
/**
* Options to create a file.
*/
export interface CreateFileOptions {
/**
* Overwrite existing file. Overwrite wins over `ignoreIfExists`
*/
overwrite?: boolean;
/**
* Ignore if exists.
*/
ignoreIfExists?: boolean;
}
export interface CreateFile {
/**
* Create file operation.
*/
export interface CreateFile extends ResourceOperation {
/**
* A create
*/
kind: 'create';
/**
* The resource to create.
*/
uri: string;
/**
* Additional options
*/
options?: CreateFileOptions;

@@ -482,10 +553,34 @@ }

}
/**
* Rename file options
*/
export interface RenameFileOptions {
/**
* Overwrite target if existing. Overwrite wins over `ignoreIfExists`
*/
overwrite?: boolean;
/**
* Ignores if target exists.
*/
ignoreIfExists?: boolean;
}
export interface RenameFile {
/**
* Rename file operation
*/
export interface RenameFile extends ResourceOperation {
/**
* A rename
*/
kind: 'rename';
/**
* The old (existing) location.
*/
oldUri: string;
/**
* The new location.
*/
newUri: string;
/**
* Rename options.
*/
options?: RenameFileOptions;

@@ -497,9 +592,30 @@ }

}
/**
* Delete file options
*/
export interface DeleteFileOptions {
/**
* Delete the content recursively if a folder is denoted.
*/
recursive?: boolean;
/**
* Ignore the operation if the file doesn't exist.
*/
ignoreIfNotExists?: boolean;
}
export interface DeleteFile {
/**
* Delete file operation
*/
export interface DeleteFile extends ResourceOperation {
/**
* A delete
*/
kind: 'delete';
/**
* The file to delete.
*/
uri: string;
/**
* Delete options.
*/
options?: DeleteFileOptions;

@@ -524,6 +640,12 @@ }

/**
* An array of `TextDocumentEdit`s to express changes to n different text documents
* where each text document edit addresses a specific version of a text document.
* Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes
* are either an array of `TextDocumentEdit`s to express changes to n different text documents
* where each text document edit addresses a specific version of a text document. Or it can contain
* above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.
*
* Whether a client supports versioned document edits is expressed via
* `WorkspaceClientCapabilites.workspaceEdit.documentChanges`.
* `workspace.workspaceEdit.documentChanges` client capability.
*
* If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then
* only plain `TextEdit`s using the `changes` property are supported.
*/

@@ -1009,6 +1131,9 @@ documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[];

/**
* The label of this signature. Will be shown in
* the UI.
* The label of this parameter information.
*
* Either a string or inclusive start and exclusive end offsets within its containing
* [signature label](#SignatureInformation.label). *Note*: A label of type string must be
* a substring of its containing signature information's [label](#SignatureInformation.label).
*/
label: string;
label: string | [number, number];
/**

@@ -1031,3 +1156,3 @@ * The human-readable doc-comment of this signature. Will be shown

*/
function create(label: string, documentation?: string): ParameterInformation;
function create(label: string | [number, number], documentation?: string): ParameterInformation;
}

@@ -1086,6 +1211,30 @@ /**

* For most programming languages there is only one location at which a symbol is
* defined. If no definition can be found `null` is returned.
* defined.
*
* Servers should prefer returning `DefinitionLink` over `Definition` if supported
* by the client.
*/
export declare type Definition = Location | Location[] | null;
export declare type Definition = Location | Location[];
/**
* Information about where a symbol is defined.
*
* Provides additional metadata over normal [location](#Location) definitions, including the range of
* the defining symbol
*/
export declare type DefinitionLink = LocationLink;
/**
* The declaration of a symbol representation as one or many [locations](#Location).
*/
export declare type Declaration = Location | Location[];
/**
* Information about where a symbol is declared.
*
* Provides additional metadata over normal [location](#Location) declarations, including the range of
* the declaring symbol.
*
* Servers should prefer returning `DeclarationLink` over `Declaration` if supported
* by the client.
*/
export declare type DeclarationLink = LocationLink;
/**
* Value-object that contains additional information when

@@ -1373,3 +1522,7 @@ * requesting references.

/**
* An array of diagnostics.
* An array of diagnostics known on the client side overlapping the range provided to the
* `textDocument/codeAction` request. They are provied so that the server knows which
* errors are currently presented to the user for the given range. There is no guarantee
* that these accurately reflect the error state of the resource. The primary parameter
* to compute code actions is the provided range.
*/

@@ -1685,1 +1838,2 @@ diagnostics: Diagnostic[];

}
export {};

@@ -82,2 +82,30 @@ /* --------------------------------------------------------------------------------------------

/**
* The LocationLink namespace provides helper functions to work with
* [LocationLink](#LocationLink) literals.
*/
export var LocationLink;
(function (LocationLink) {
/**
* Creates a LocationLink literal.
* @param targetUri The definition's uri.
* @param targetRange The full range of the definition.
* @param targetSelectionRange The span of the symbol definition at the target.
* @param originSelectionRange The span of the symbol being defined in the originating source file.
*/
function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
}
LocationLink.create = create;
/**
* Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
*/
function is(value) {
var candidate = value;
return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
&& (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
&& (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
}
LocationLink.is = is;
})(LocationLink || (LocationLink = {}));
/**
* The Color namespace provides helper functions to work with

@@ -828,3 +856,3 @@ * [Color](#Color) literals.

var candidate = value;
return Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
MarkedString.is(candidate.contents) ||

@@ -1253,3 +1281,3 @@ Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));

else {
throw new Error('Ovelapping edit');
throw new Error('Overlapping edit');
}

@@ -1256,0 +1284,0 @@ lastModifiedOffset = startOffset;

@@ -117,2 +117,48 @@ /**

/**
* Represents the connection of two locations. Provides additional metadata over normal [locations](#Location),
* including an origin range.
*/
export interface LocationLink {
/**
* Span of the origin of this link.
*
* Used as the underlined span for mouse definition hover. Defaults to the word range at
* the definition position.
*/
originSelectionRange?: Range;
/**
* The target resource identifier of this link.
*/
targetUri: string;
/**
* The full target range of this link. If the target for example is a symbol then target range is the
* range enclosing this symbol not including leading/trailing whitespace but everything else
* like comments. This information is typically used to highlight the range in the editor.
*/
targetRange: Range;
/**
* The range that should be selected and revealed when this link is being followed, e.g the name of a function.
* Must be contained by the the `targetRange`. See also `DocumentSymbol#range`
*/
targetSelectionRange: Range;
}
/**
* The LocationLink namespace provides helper functions to work with
* [LocationLink](#LocationLink) literals.
*/
export declare namespace LocationLink {
/**
* Creates a LocationLink literal.
* @param targetUri The definition's uri.
* @param targetRange The full range of the definition.
* @param targetSelectionRange The span of the symbol definition at the target.
* @param originSelectionRange The span of the symbol being defined in the originating source file.
*/
function create(targetUri: string, targetRange: Range, targetSelectionRange: Range, originSelectionRange?: Range): LocationLink;
/**
* Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
*/
function is(value: any): value is LocationLink;
}
/**
* Represents a color in RGBA space.

@@ -336,3 +382,3 @@ */

/**
* The diagnostic's code, which might appear in the user interface.
* The diagnostic's code, which usually appear in the user interface.
*/

@@ -342,7 +388,8 @@ code?: number | string;

* A human-readable string describing the source of this
* diagnostic, e.g. 'typescript' or 'super lint'.
* diagnostic, e.g. 'typescript' or 'super lint'. It usually
* appears in the user interface.
*/
source?: string;
/**
* The diagnostic's message.
* The diagnostic's message. It usually appears in the user interface
*/

@@ -468,9 +515,33 @@ message: string;

}
interface ResourceOperation {
kind: string;
}
/**
* Options to create a file.
*/
export interface CreateFileOptions {
/**
* Overwrite existing file. Overwrite wins over `ignoreIfExists`
*/
overwrite?: boolean;
/**
* Ignore if exists.
*/
ignoreIfExists?: boolean;
}
export interface CreateFile {
/**
* Create file operation.
*/
export interface CreateFile extends ResourceOperation {
/**
* A create
*/
kind: 'create';
/**
* The resource to create.
*/
uri: string;
/**
* Additional options
*/
options?: CreateFileOptions;

@@ -482,10 +553,34 @@ }

}
/**
* Rename file options
*/
export interface RenameFileOptions {
/**
* Overwrite target if existing. Overwrite wins over `ignoreIfExists`
*/
overwrite?: boolean;
/**
* Ignores if target exists.
*/
ignoreIfExists?: boolean;
}
export interface RenameFile {
/**
* Rename file operation
*/
export interface RenameFile extends ResourceOperation {
/**
* A rename
*/
kind: 'rename';
/**
* The old (existing) location.
*/
oldUri: string;
/**
* The new location.
*/
newUri: string;
/**
* Rename options.
*/
options?: RenameFileOptions;

@@ -497,9 +592,30 @@ }

}
/**
* Delete file options
*/
export interface DeleteFileOptions {
/**
* Delete the content recursively if a folder is denoted.
*/
recursive?: boolean;
/**
* Ignore the operation if the file doesn't exist.
*/
ignoreIfNotExists?: boolean;
}
export interface DeleteFile {
/**
* Delete file operation
*/
export interface DeleteFile extends ResourceOperation {
/**
* A delete
*/
kind: 'delete';
/**
* The file to delete.
*/
uri: string;
/**
* Delete options.
*/
options?: DeleteFileOptions;

@@ -524,6 +640,12 @@ }

/**
* An array of `TextDocumentEdit`s to express changes to n different text documents
* where each text document edit addresses a specific version of a text document.
* Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes
* are either an array of `TextDocumentEdit`s to express changes to n different text documents
* where each text document edit addresses a specific version of a text document. Or it can contain
* above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.
*
* Whether a client supports versioned document edits is expressed via
* `WorkspaceClientCapabilites.workspaceEdit.documentChanges`.
* `workspace.workspaceEdit.documentChanges` client capability.
*
* If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then
* only plain `TextEdit`s using the `changes` property are supported.
*/

@@ -1009,6 +1131,9 @@ documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[];

/**
* The label of this signature. Will be shown in
* the UI.
* The label of this parameter information.
*
* Either a string or inclusive start and exclusive end offsets within its containing
* [signature label](#SignatureInformation.label). *Note*: A label of type string must be
* a substring of its containing signature information's [label](#SignatureInformation.label).
*/
label: string;
label: string | [number, number];
/**

@@ -1031,3 +1156,3 @@ * The human-readable doc-comment of this signature. Will be shown

*/
function create(label: string, documentation?: string): ParameterInformation;
function create(label: string | [number, number], documentation?: string): ParameterInformation;
}

@@ -1086,6 +1211,30 @@ /**

* For most programming languages there is only one location at which a symbol is
* defined. If no definition can be found `null` is returned.
* defined.
*
* Servers should prefer returning `DefinitionLink` over `Definition` if supported
* by the client.
*/
export declare type Definition = Location | Location[] | null;
export declare type Definition = Location | Location[];
/**
* Information about where a symbol is defined.
*
* Provides additional metadata over normal [location](#Location) definitions, including the range of
* the defining symbol
*/
export declare type DefinitionLink = LocationLink;
/**
* The declaration of a symbol representation as one or many [locations](#Location).
*/
export declare type Declaration = Location | Location[];
/**
* Information about where a symbol is declared.
*
* Provides additional metadata over normal [location](#Location) declarations, including the range of
* the declaring symbol.
*
* Servers should prefer returning `DeclarationLink` over `Declaration` if supported
* by the client.
*/
export declare type DeclarationLink = LocationLink;
/**
* Value-object that contains additional information when

@@ -1373,3 +1522,7 @@ * requesting references.

/**
* An array of diagnostics.
* An array of diagnostics known on the client side overlapping the range provided to the
* `textDocument/codeAction` request. They are provied so that the server knows which
* errors are currently presented to the user for the given range. There is no guarantee
* that these accurately reflect the error state of the resource. The primary parameter
* to compute code actions is the provided range.
*/

@@ -1685,1 +1838,2 @@ diagnostics: Diagnostic[];

}
export {};

@@ -92,2 +92,30 @@ (function (factory) {

/**
* The LocationLink namespace provides helper functions to work with
* [LocationLink](#LocationLink) literals.
*/
var LocationLink;
(function (LocationLink) {
/**
* Creates a LocationLink literal.
* @param targetUri The definition's uri.
* @param targetRange The full range of the definition.
* @param targetSelectionRange The span of the symbol definition at the target.
* @param originSelectionRange The span of the symbol being defined in the originating source file.
*/
function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
}
LocationLink.create = create;
/**
* Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
*/
function is(value) {
var candidate = value;
return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
&& (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
&& (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
}
LocationLink.is = is;
})(LocationLink = exports.LocationLink || (exports.LocationLink = {}));
/**
* The Color namespace provides helper functions to work with

@@ -838,3 +866,3 @@ * [Color](#Color) literals.

var candidate = value;
return Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
MarkedString.is(candidate.contents) ||

@@ -1265,3 +1293,3 @@ Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));

else {
throw new Error('Ovelapping edit');
throw new Error('Overlapping edit');
}

@@ -1268,0 +1296,0 @@ lastModifiedOffset = startOffset;

2

package.json
{
"name": "vscode-languageserver-types",
"description": "Types used by the Language server for node",
"version": "3.13.0",
"version": "3.14.0",
"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