Skip to content

Commit

Permalink
Update LKG
Browse files Browse the repository at this point in the history
  • Loading branch information
mhegazy committed Oct 26, 2017
1 parent a7e172b commit 1359a93
Show file tree
Hide file tree
Showing 8 changed files with 383 additions and 297 deletions.
14 changes: 13 additions & 1 deletion lib/protocol.d.ts
Expand Up @@ -1225,7 +1225,11 @@ declare namespace ts.server.protocol {
/**
* Names of one or more entries for which to obtain details.
*/
entryNames: string[];
entryNames: (string | CompletionEntryIdentifier)[];
}
interface CompletionEntryIdentifier {
name: string;
source: string;
}
/**
* Completion entry details request; value of command field is
Expand Down Expand Up @@ -1281,6 +1285,10 @@ declare namespace ts.server.protocol {
* made to avoid errors. The CompletionEntryDetails will have these actions.
*/
hasAction?: true;
/**
* Identifier (not necessarily human-readable) identifying where this completion came from.
*/
source?: string;
}
/**
* Additional completion entry details, available on demand
Expand Down Expand Up @@ -1314,6 +1322,10 @@ declare namespace ts.server.protocol {
* The associated code actions for this entry
*/
codeActions?: CodeAction[];
/**
* Human-readable description of the `source` from the CompletionEntry.
*/
source?: SymbolDisplayPart[];
}
interface CompletionsResponse extends Response {
body?: CompletionEntry[];
Expand Down
160 changes: 82 additions & 78 deletions lib/tsserver.js

Large diffs are not rendered by default.

21 changes: 17 additions & 4 deletions lib/tsserverlibrary.d.ts
Expand Up @@ -3915,8 +3915,8 @@ declare namespace ts {
getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications;
getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications;
getCompletionsAtPosition(fileName: string, position: number): CompletionInfo;
getCompletionEntryDetails(fileName: string, position: number, entryName: string, options?: FormatCodeOptions | FormatCodeSettings): CompletionEntryDetails;
getCompletionEntrySymbol(fileName: string, position: number, entryName: string): Symbol;
getCompletionEntryDetails(fileName: string, position: number, name: string, options?: FormatCodeOptions | FormatCodeSettings, source?: string): CompletionEntryDetails;
getCompletionEntrySymbol(fileName: string, position: number, name: string, source?: string): Symbol;
getQuickInfoAtPosition(fileName: string, position: number): QuickInfo;
getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan;
getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan;
Expand Down Expand Up @@ -4296,6 +4296,7 @@ declare namespace ts {
*/
replacementSpan?: TextSpan;
hasAction?: true;
source?: string;
}
interface CompletionEntryDetails {
name: string;
Expand All @@ -4305,6 +4306,7 @@ declare namespace ts {
documentation: SymbolDisplayPart[];
tags: JSDocTagInfo[];
codeActions?: CodeAction[];
source?: SymbolDisplayPart[];
}
interface OutliningSpan {
/** The span of the document to actually collapse. */
Expand Down Expand Up @@ -6031,7 +6033,11 @@ declare namespace ts.server.protocol {
/**
* Names of one or more entries for which to obtain details.
*/
entryNames: string[];
entryNames: (string | CompletionEntryIdentifier)[];
}
interface CompletionEntryIdentifier {
name: string;
source: string;
}
/**
* Completion entry details request; value of command field is
Expand Down Expand Up @@ -6087,6 +6093,10 @@ declare namespace ts.server.protocol {
* made to avoid errors. The CompletionEntryDetails will have these actions.
*/
hasAction?: true;
/**
* Identifier (not necessarily human-readable) identifying where this completion came from.
*/
source?: string;
}
/**
* Additional completion entry details, available on demand
Expand Down Expand Up @@ -6120,6 +6130,10 @@ declare namespace ts.server.protocol {
* The associated code actions for this entry
*/
codeActions?: CodeAction[];
/**
* Human-readable description of the `source` from the CompletionEntry.
*/
source?: SymbolDisplayPart[];
}
interface CompletionsResponse extends Response {
body?: CompletionEntry[];
Expand Down Expand Up @@ -7227,7 +7241,6 @@ declare namespace ts.server {
getScriptInfo(uncheckedFileName: string): ScriptInfo;
filesToString(writeProjectFileNames: boolean): string;
setCompilerOptions(compilerOptions: CompilerOptions): void;
reloadScript(filename: NormalizedPath, tempFileName?: NormalizedPath): boolean;
protected removeRoot(info: ScriptInfo): void;
}
/**
Expand Down

0 comments on commit 1359a93

Please sign in to comment.