33 * Licensed under the MIT License. See License.txt in the project root for license information.
44 * ------------------------------------------------------------------------------------------ */
55
6- import * as lsp from 'vscode-languageserver-protocol ' ;
6+ import * as types from 'vscode-languageserver-types ' ;
77
88namespace Is {
99 export function boolean ( value : any ) : value is boolean {
@@ -31,11 +31,11 @@ namespace Is {
3131 return typeof value === 'number' || value instanceof Number ;
3232 }
3333
34- export function symbolKind ( value : any ) : value is lsp . SymbolKind {
34+ export function symbolKind ( value : any ) : value is types . SymbolKind {
3535 return typeof value === 'number' || value instanceof Number ;
3636 }
3737
38- export function symbolTag ( value : any ) : value is lsp . SymbolTag {
38+ export function symbolTag ( value : any ) : value is types . SymbolTag {
3939 return typeof value === 'number' || value instanceof Number ;
4040 }
4141}
@@ -512,12 +512,12 @@ export interface DeclarationTag {
512512 /**
513513 * The symbol kind.
514514 */
515- kind : lsp . SymbolKind ;
515+ kind : types . SymbolKind ;
516516
517517 /**
518518 * Additional tags for the definition.
519519 */
520- tags ?: lsp . SymbolTag [ ] ;
520+ tags ?: types . SymbolTag [ ] ;
521521
522522 /**
523523 * Indicates if this symbol is deprecated.
@@ -530,7 +530,7 @@ export interface DeclarationTag {
530530 * The full range of the declaration not including leading/trailing whitespace but everything else, e.g comments and code.
531531 * The range must be included in fullRange.
532532 */
533- fullRange : lsp . Range ;
533+ fullRange : types . Range ;
534534
535535 /**
536536 * Optional detail information for the declaration.
@@ -545,7 +545,7 @@ export namespace DeclarationTag {
545545 kind : new Property ( Is . symbolKind ) ,
546546 tags : new Property ( Is . symbolTag , PropertyFlags . optional ) ,
547547 deprecated : new BooleanProperty ( PropertyFlags . optional ) ,
548- fullRange : new Property ( lsp . Range . is ) ,
548+ fullRange : new Property ( types . Range . is ) ,
549549 detail : new StringProperty ( PropertyFlags . optional )
550550 } ) ;
551551 export function is ( value : any ) : value is DeclarationTag {
@@ -570,12 +570,12 @@ export interface DefinitionTag {
570570 /**
571571 * The symbol kind.
572572 */
573- kind : lsp . SymbolKind ;
573+ kind : types . SymbolKind ;
574574
575575 /**
576576 * Additional tags for the definition.
577577 */
578- tags ?: lsp . SymbolTag [ ] ;
578+ tags ?: types . SymbolTag [ ] ;
579579
580580 /**
581581 * Indicates if this symbol is deprecated.
@@ -588,7 +588,7 @@ export interface DefinitionTag {
588588 * The full range of the definition not including leading/trailing whitespace but everything else, e.g comments and code.
589589 * The range must be included in fullRange.
590590 */
591- fullRange : lsp . Range ;
591+ fullRange : types . Range ;
592592
593593 /**
594594 * Optional detail information for the definition.
@@ -603,7 +603,7 @@ export namespace DefinitionTag {
603603 kind : new Property ( Is . symbolKind ) ,
604604 tags : new Property ( Is . symbolTag , PropertyFlags . optional ) ,
605605 deprecated : new BooleanProperty ( PropertyFlags . optional ) ,
606- fullRange : new Property ( lsp . Range . is ) ,
606+ fullRange : new Property ( types . Range . is ) ,
607607 detail : new StringProperty ( PropertyFlags . optional )
608608 } ) ;
609609 export function is ( value : any ) : value is DefinitionTag {
@@ -693,7 +693,7 @@ export namespace RangeTag {
693693/**
694694 * A vertex representing a range inside a document.
695695 */
696- export interface Range extends V , lsp . Range {
696+ export interface Range extends V , types . Range {
697697
698698 label : VertexLabels . range ;
699699
@@ -707,8 +707,8 @@ export namespace Range {
707707 export const descriptor = new VertexDescriptor < Required < Range > > ( Object . assign ( { } , V . descriptor . description , {
708708 label : VertexLabels . property ( VertexLabels . range ) ,
709709 tag : RangeTag . property ( PropertyFlags . optional ) ,
710- start : new Property ( lsp . Position . is ) ,
711- end : new Property ( lsp . Position . is )
710+ start : new Property ( types . Position . is ) ,
711+ end : new Property ( types . Position . is )
712712 } ) ) ;
713713 export function is ( value : any ) : value is Range {
714714 return descriptor . validate ( value ) ;
@@ -794,13 +794,13 @@ export interface Location extends V {
794794 /**
795795 * The location's range
796796 */
797- range : lsp . Range ;
797+ range : types . Range ;
798798}
799799
800800export namespace Location {
801801 export const descriptor = new VertexDescriptor < Required < Location > > ( Object . assign ( { } , V . descriptor . description , {
802802 label : VertexLabels . property ( VertexLabels . location ) ,
803- range : new Property < lsp . Range > ( value => lsp . Range . is ( value ) )
803+ range : new Property < types . Range > ( value => types . Range . is ( value ) )
804804 } ) ) ;
805805 export function is ( value : any ) : value is Location {
806806 return descriptor . validate ( value ) ;
@@ -1300,13 +1300,13 @@ export interface DocumentSymbolResult extends V {
13001300
13011301 label : VertexLabels . documentSymbolResult ;
13021302
1303- result : lsp . DocumentSymbol [ ] | RangeBasedDocumentSymbol [ ] ;
1303+ result : types . DocumentSymbol [ ] | RangeBasedDocumentSymbol [ ] ;
13041304}
13051305
13061306export namespace DocumentSymbolResult {
13071307 export const descriptor = new VertexDescriptor < DocumentSymbolResult > ( Object . assign ( { } , V . descriptor . description , {
13081308 label : VertexLabels . property ( VertexLabels . documentSymbolResult ) ,
1309- result : new Property < lsp . DocumentSymbol [ ] | RangeBasedDocumentSymbol [ ] > ( value => {
1309+ result : new Property < types . DocumentSymbol [ ] | RangeBasedDocumentSymbol [ ] > ( value => {
13101310 if ( ! Array . isArray ( value ) ) {
13111311 return false ;
13121312 }
@@ -1316,7 +1316,7 @@ export namespace DocumentSymbolResult {
13161316 const first = value [ 0 ] ;
13171317 const validator = ( first as RangeBasedDocumentSymbol ) . id !== undefined
13181318 ? RangeBasedDocumentSymbol . is
1319- : lsp . DocumentSymbol . is ;
1319+ : types . DocumentSymbol . is ;
13201320 for ( const item of value ) {
13211321 if ( ! validator ( item ) ) {
13221322 return false ;
@@ -1343,13 +1343,13 @@ export interface DiagnosticResult extends V {
13431343 /**
13441344 * The diagnostics.
13451345 */
1346- result : lsp . Diagnostic [ ] ;
1346+ result : types . Diagnostic [ ] ;
13471347}
13481348
13491349export namespace DiagnosticResult {
13501350 export const descriptor = new VertexDescriptor < DiagnosticResult > ( Object . assign ( { } , V . descriptor . description , {
13511351 label : VertexLabels . property ( VertexLabels . diagnosticResult ) ,
1352- result : new ArrayProperty ( lsp . Diagnostic . is )
1352+ result : new ArrayProperty ( types . Diagnostic . is )
13531353 } ) ) ;
13541354 export function is ( value : any ) : value is DiagnosticResult {
13551355 return descriptor . validate ( value ) ;
@@ -1369,13 +1369,13 @@ export interface FoldingRangeResult extends V {
13691369 /**
13701370 * The actual folding ranges.
13711371 */
1372- result : lsp . FoldingRange [ ] ;
1372+ result : types . FoldingRange [ ] ;
13731373}
13741374
13751375export namespace FoldingRangeResult {
13761376 export const descriptor = new VertexDescriptor < FoldingRangeResult > ( Object . assign ( { } , V . descriptor . description , {
13771377 label : VertexLabels . property ( VertexLabels . foldingRangeResult ) ,
1378- result : new ArrayProperty ( lsp . FoldingRange . is )
1378+ result : new ArrayProperty ( types . FoldingRange . is )
13791379 } ) ) ;
13801380 export function is ( value : any ) : value is FoldingRangeResult {
13811381 return descriptor . validate ( value ) ;
@@ -1395,13 +1395,13 @@ export interface DocumentLinkResult extends V {
13951395 /**
13961396 * The actual document links.
13971397 */
1398- result : lsp . DocumentLink [ ] ;
1398+ result : types . DocumentLink [ ] ;
13991399}
14001400
14011401export namespace DocumentLinkResult {
14021402 export const descriptor = new VertexDescriptor < DocumentLinkResult > ( Object . assign ( { } , V . descriptor . description , {
14031403 label : VertexLabels . property ( VertexLabels . documentLinkResult ) ,
1404- result : new ArrayProperty ( lsp . DocumentLink . is )
1404+ result : new ArrayProperty ( types . DocumentLink . is )
14051405 } ) ) ;
14061406 export function is ( value : any ) : value is DocumentLinkResult {
14071407 return descriptor . validate ( value ) ;
@@ -1518,13 +1518,13 @@ export interface HoverResult extends V {
15181518 /**
15191519 * The hover result. This is the normal LSP hover result.
15201520 */
1521- result : lsp . Hover ;
1521+ result : types . Hover ;
15221522}
15231523
15241524export namespace HoverResult {
15251525 export const descriptor = new VertexDescriptor < HoverResult > ( Object . assign ( { } , V . descriptor . description , {
15261526 label : VertexLabels . property ( VertexLabels . hoverResult ) ,
1527- result : new Property < lsp . Hover > ( lsp . Hover . is )
1527+ result : new Property < types . Hover > ( types . Hover . is )
15281528 } ) ) ;
15291529 export function is ( value : any ) : value is HoverResult {
15301530 return descriptor . validate ( value ) ;
0 commit comments