Skip to content

Commit

Permalink
Avoid useless changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingwl committed May 18, 2020
1 parent c0a26e9 commit ceeaead
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/harness/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ namespace ts.server {
matchKind: entry.matchKind as keyof typeof PatternMatchKind,
isCaseSensitive: entry.isCaseSensitive,
fileName: entry.file,
textSpan: this.decodeSpan(entry)
textSpan: this.decodeSpan(entry),
}));
}

Expand Down Expand Up @@ -388,7 +388,7 @@ namespace ts.server {
category: Debug.checkDefined(category, "convertDiagnostic: category should not be undefined"),
code: entry.code,
reportsUnnecessary: entry.reportsUnnecessary,
reportsDeprecated: entry.reportsDeprecated
reportsDeprecated: entry.reportsDeprecated,
};
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/harness/fourslashImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2982,7 +2982,7 @@ namespace FourSlash {
fileName: e.range.fileName,
textSpan: ts.createTextSpanFromRange(e.range),
containerName: e.containerName || "",
containerKind: e.containerKind || ts.ScriptElementKind.unknown
containerKind: e.containerKind || ts.ScriptElementKind.unknown,
})));
}
}
Expand Down
1 change: 0 additions & 1 deletion src/harness/fourslashInterfaceImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,6 @@ namespace FourSlashInterface {
range?: FourSlash.Range;
code: number;
reportsUnnecessary?: true;

reportsDeprecated?: true;
}

Expand Down
1 change: 0 additions & 1 deletion src/server/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ namespace ts.server.protocol {
code: number;
/** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
reportsUnnecessary?: {};

reportsDeprecated?: {};
relatedInformation?: DiagnosticRelatedInformation[];
}
Expand Down
6 changes: 3 additions & 3 deletions src/server/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1864,7 +1864,7 @@ namespace ts.server {
kindModifiers: tree.kindModifiers,
spans: tree.spans.map(span => toProtocolTextSpan(span, scriptInfo)),
nameSpan: tree.nameSpan && toProtocolTextSpan(tree.nameSpan, scriptInfo),
childItems: map(tree.childItems, item => this.toLocationNavigationTree(item, scriptInfo)),
childItems: map(tree.childItems, item => this.toLocationNavigationTree(item, scriptInfo))
};
}

Expand All @@ -1891,7 +1891,7 @@ namespace ts.server {
matchKind: navItem.matchKind,
file: navItem.fileName,
start: scriptInfo.positionToLineOffset(navItem.textSpan.start),
end: scriptInfo.positionToLineOffset(textSpanEnd(navItem.textSpan)),
end: scriptInfo.positionToLineOffset(textSpanEnd(navItem.textSpan))
};
if (navItem.kindModifiers && (navItem.kindModifiers !== "")) {
bakedItem.kindModifiers = navItem.kindModifiers;
Expand Down Expand Up @@ -2229,7 +2229,7 @@ namespace ts.server {
kindModifiers: item.kindModifiers,
file: item.file,
span: toProtocolTextSpan(item.span, scriptInfo),
selectionSpan: toProtocolTextSpan(item.selectionSpan, scriptInfo),
selectionSpan: toProtocolTextSpan(item.selectionSpan, scriptInfo)
};
}

Expand Down
4 changes: 2 additions & 2 deletions src/services/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ namespace ts.Completions {
name: tagName.getFullText(sourceFile) + (hasClosingAngleBracket ? "" : ">"),
kind: ScriptElementKind.classElement,
kindModifiers: undefined,
sortText: SortText.LocationPriority
sortText: SortText.LocationPriority,
};
return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: false, entries: [entry] };
}
Expand Down Expand Up @@ -436,7 +436,7 @@ namespace ts.Completions {
hasAction: origin && originIsExport(origin) || undefined,
isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || undefined,
insertText,
replacementSpan
replacementSpan,
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/services/jsDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ namespace ts.JsDoc {
name: tagName,
kind: ScriptElementKind.keyword,
kindModifiers: "",
sortText: "0"
sortText: "0",
};
}));
}
Expand Down
3 changes: 1 addition & 2 deletions src/services/shims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,7 @@ namespace ts {
category: string;
code: number;
reportsUnnecessary?: {};

reportsDeprecated?: {}
reportsDeprecated?: {};
}
export function realizeDiagnostics(diagnostics: readonly Diagnostic[], newLine: string): RealizedDiagnostic[] {
return diagnostics.map(d => realizeDiagnostic(d, newLine));
Expand Down
2 changes: 1 addition & 1 deletion src/testRunner/unittests/tsserver/declarationFileMaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ namespace ts.projectSystem {
matchKind: "prefix",
isCaseSensitive: true,
kind: ScriptElementKind.functionElement,
kindModifiers: "export,declare"
kindModifiers: "export,declare",
},
{
...protocolFileSpanFromSubstring({
Expand Down
1 change: 0 additions & 1 deletion src/testRunner/unittests/tsserver/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ namespace ts.projectSystem {
category: DiagnosticCategory;
code: number;
reportsUnnecessary?: {};

reportsDeprecated?: {};
source?: string;
relatedInformation?: DiagnosticRelatedInformation[];
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3543,7 +3543,7 @@ declare namespace ts {
/** Gets the JSDoc template tag for the node if present */
function getJSDocTemplateTag(node: Node): JSDocTemplateTag | undefined;
/** Gets the JSDoc deprecated tag for the node if present */
function getJSDocDeprecatedTag(node: Node): JSDocDeprecatedTag | undefined;
function getJSDocDeprecatedTag(node: Node, noCache?: boolean): JSDocDeprecatedTag | undefined;
/** Gets the JSDoc type tag for the node if present and valid */
function getJSDocTypeTag(node: Node): JSDocTypeTag | undefined;
/**
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/api/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3543,7 +3543,7 @@ declare namespace ts {
/** Gets the JSDoc template tag for the node if present */
function getJSDocTemplateTag(node: Node): JSDocTemplateTag | undefined;
/** Gets the JSDoc deprecated tag for the node if present */
function getJSDocDeprecatedTag(node: Node): JSDocDeprecatedTag | undefined;
function getJSDocDeprecatedTag(node: Node, noCache?: boolean): JSDocDeprecatedTag | undefined;
/** Gets the JSDoc type tag for the node if present and valid */
function getJSDocTypeTag(node: Node): JSDocTypeTag | undefined;
/**
Expand Down

0 comments on commit ceeaead

Please sign in to comment.