mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Setup shim and stubbed out functions
This commit is contained in:
@@ -381,6 +381,9 @@ module Harness.LanguageService {
|
||||
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: ts.FormatCodeOptions): ts.TextChange[] {
|
||||
return unwrapJSONCallResult(this.shim.getFormattingEditsAfterKeystroke(fileName, position, key, JSON.stringify(options)));
|
||||
}
|
||||
getDocCommentScaffoldingAtPosition(fileName: string, position: number): string {
|
||||
return unwrapJSONCallResult(this.shim.getDocCommentScaffoldingAtPosition(fileName, position));
|
||||
}
|
||||
getEmitOutput(fileName: string): ts.EmitOutput {
|
||||
return unwrapJSONCallResult(this.shim.getEmitOutput(fileName));
|
||||
}
|
||||
|
||||
@@ -540,6 +540,10 @@ namespace ts.server {
|
||||
getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[] {
|
||||
throw new Error("Not Implemented Yet.");
|
||||
}
|
||||
|
||||
getDocCommentScaffoldingAtPosition(fileName: string, position: number): string {
|
||||
throw new Error("Not Implemented Yet.");
|
||||
}
|
||||
|
||||
getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[] {
|
||||
var lineOffset = this.positionToOneBasedLineOffset(fileName, position);
|
||||
|
||||
@@ -1032,6 +1032,8 @@ namespace ts {
|
||||
getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[];
|
||||
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[];
|
||||
|
||||
getDocCommentScaffoldingAtPosition(fileName: string, position: number): string;
|
||||
|
||||
getEmitOutput(fileName: string): EmitOutput;
|
||||
|
||||
getProgram(): Program;
|
||||
@@ -6698,6 +6700,10 @@ namespace ts {
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
function getDocCommentScaffoldingAtPosition(filename: string, position: number): string {
|
||||
return "/** getDocCommentScaffoldingAtPosition -- TS side! */";
|
||||
}
|
||||
|
||||
function getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[] {
|
||||
// Note: while getting todo comments seems like a syntactic operation, we actually
|
||||
@@ -6940,6 +6946,7 @@ namespace ts {
|
||||
getFormattingEditsForRange,
|
||||
getFormattingEditsForDocument,
|
||||
getFormattingEditsAfterKeystroke,
|
||||
getDocCommentScaffoldingAtPosition,
|
||||
getEmitOutput,
|
||||
getSourceFile,
|
||||
getProgram
|
||||
|
||||
@@ -197,6 +197,8 @@ namespace ts {
|
||||
getFormattingEditsForDocument(fileName: string, options: string/*Services.FormatCodeOptions*/): string;
|
||||
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: string/*Services.FormatCodeOptions*/): string;
|
||||
|
||||
getDocCommentScaffoldingAtPosition(fileName: string, position: number): string;
|
||||
|
||||
getEmitOutput(fileName: string): string;
|
||||
}
|
||||
|
||||
@@ -785,6 +787,17 @@ namespace ts {
|
||||
});
|
||||
}
|
||||
|
||||
public getDocCommentScaffoldingAtPosition(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getDocCommentScaffoldingAtPosition('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
var commentText = this.languageService.getDocCommentScaffoldingAtPosition(fileName, position);
|
||||
return commentText;
|
||||
}
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
/// NAVIGATE TO
|
||||
|
||||
/** Return a list of symbols that are interesting to navigate to */
|
||||
|
||||
Reference in New Issue
Block a user