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

vscode-languageserver-types

Package Overview
Dependencies
Maintainers
7
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.0.2-beta.1 to 3.0.2-beta.2

84

lib/main.d.ts

@@ -10,3 +10,12 @@ /**

/**
* Character offset on a line in a document (zero-based).
* Character offset on a line in a document (zero-based). Assuming that the line is
* represented as a string, the `character` value represents the gap between the
* `character` and `character + 1`. Given the following line: 'a𐐀c', character 0 is
* the gap between the start of the start and 'a' ('|a𐐀c'), character 1 is the gap
* between 'a' and '𐐀' ('a|𐐀c') and character 2 is the gap between '𐐀' and 'b' ('a𐐀|c').
*
* The string 'a𐐀c' consist of 3 characters with valid character values being 0, 1, 2, 3
* for that string. Note that the string encoded in UTF-16 is encoded using 4 code units
* (the 𐐀 is encoded using two code units). The character offset is therefore encoding
* independent.
*/

@@ -308,31 +317,48 @@ character: number;

}
/**
* A snippet string is a template which allows to insert text
* and to control the editor cursor when insertion happens.
*
* A snippet can define tab stops and placeholders with `$1`, `$2`
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
* the end of the snippet. Placeholders with equal identifiers are linked,
* that is typing in one will update others too.
*/
export interface SnippetString {
export declare namespace StringType {
/**
* The snippet string.
* The strings is a normal string and will be inserted as is.
*/
const Normal = 1;
/**
* A snippet string is a template which allows to insert text
* and to control the editor cursor when insertion happens.
*
* A snippet can define tab stops and placeholders with `$1`, `$2`
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
* the end of the snippet. Placeholders with equal identifiers are linked,
* that is typing in one will update others too.
*/
const Snippet = 2;
}
export declare type StringType = 1 | 2;
export interface TypedString {
/**
* The string type.
*/
type: StringType;
/**
* The string value.
*/
value: string;
}
/**
* The SnippetString namespace provides helper functions to work with
* [SnippetString](#SnippetString) literals.
* The TypedString namespace provides helper functions to work with
* [TypedString](#TypedString) literals.
*/
export declare namespace SnippetString {
export declare namespace TypedString {
/**
* Creates a new SnippetString literal.
* @param uri The document's uri.
* Creates a new TypedString literal.
* @param value the string value.
*/
function create(value: string): SnippetString;
function createNormal(value: string): TypedString;
/**
* Checks whether the given literal conforms to the [SnippetString](#SnippetString) interface.
* Creates a new TypedString literal for snippet strings
* @param value the snippet string value.
*/
function is(value: any): value is SnippetString;
function createSnippet(value: string): TypedString;
/**
* Checks whether the given literal conforms to the [TypedString](#TypedString) interface.
*/
function is(value: any): value is TypedString;
}

@@ -495,3 +521,3 @@ /**

*/
insertText?: string | SnippetString;
insertText?: string | TypedString;
/**

@@ -551,4 +577,3 @@ * A range of text that should be replaced by this completion item.

/**
* This list it not complete. Further typing should result in recomputing
* this list.
* This list it not complete. Further typing results in recomputing this list.
*/

@@ -576,4 +601,12 @@ isIncomplete: boolean;

* MarkedString can be used to render human readable text. It is either a markdown string
* or a code-block that provides a language and a code snippet. Note that
* markdown strings will be sanitized - that means html will be escaped.
* or a code-block that provides a language and a code snippet. The language identifier
* is sematically equal to the optional language identifier in fenced code blocks in GitHub
* issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
*
* The pair of a language and a value is an equivalent to markdown:
* ```${language}
* ${value}
* ```
*
* Note that markdown strings will be sanitized - that means html will be escaped.
*/

@@ -937,2 +970,3 @@ export declare type MarkedString = string | {

}
export declare const EOL: string[];
/**

@@ -939,0 +973,0 @@ * A simple text document. Not to be implemenented.

@@ -289,25 +289,51 @@ (function (dependencies, factory) {

exports.WorkspaceChange = WorkspaceChange;
var StringType;
(function (StringType) {
/**
* The strings is a normal string and will be inserted as is.
*/
StringType.Normal = 1;
/**
* A snippet string is a template which allows to insert text
* and to control the editor cursor when insertion happens.
*
* A snippet can define tab stops and placeholders with `$1`, `$2`
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
* the end of the snippet. Placeholders with equal identifiers are linked,
* that is typing in one will update others too.
*/
StringType.Snippet = 2;
})(StringType = exports.StringType || (exports.StringType = {}));
/**
* The SnippetString namespace provides helper functions to work with
* [SnippetString](#SnippetString) literals.
* The TypedString namespace provides helper functions to work with
* [TypedString](#TypedString) literals.
*/
var SnippetString;
(function (SnippetString) {
var TypedString;
(function (TypedString) {
/**
* Creates a new SnippetString literal.
* @param uri The document's uri.
* Creates a new TypedString literal.
* @param value the string value.
*/
function create(value) {
return { value: value };
function createNormal(value) {
return { type: StringType.Normal, value: value };
}
SnippetString.create = create;
TypedString.createNormal = createNormal;
/**
* Checks whether the given literal conforms to the [SnippetString](#SnippetString) interface.
* Creates a new TypedString literal for snippet strings
* @param value the snippet string value.
*/
function createSnippet(value) {
return { type: StringType.Snippet, value: value };
}
TypedString.createSnippet = createSnippet;
/**
* Checks whether the given literal conforms to the [TypedString](#TypedString) interface.
*/
function is(value) {
var candidate = value;
return Is.defined(candidate) && Is.string(candidate.value);
return Is.defined(candidate) && Is.string(candidate.value) &&
Is.number(candidate.type) && (candidate.type === StringType.Normal || candidate.type === StringType.Snippet);
}
SnippetString.is = is;
})(SnippetString = exports.SnippetString || (exports.SnippetString = {}));
TypedString.is = is;
})(TypedString = exports.TypedString || (exports.TypedString = {}));
/**

@@ -683,2 +709,3 @@ * The TextDocumentIdentifier namespace provides helper functions to work with

exports.DocumentLink = DocumentLink;
exports.EOL = ['\n', '\r\n', '\r'];
var TextDocument;

@@ -685,0 +712,0 @@ (function (TextDocument) {

{
"name": "vscode-languageserver-types",
"description": "Types used by the Language server for node",
"version": "3.0.2-beta.1",
"version": "3.0.2-beta.2",
"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