fix(47562): Add option to suppress type hint if variable name matches type name (#48529)

* fix(47562): Add option to suppress type hint if variable name matches type

* Remove the unnecessary debug code

* Re-run gulp runtests

* Use equateStringsCaseInsensitive to compare strings
This commit is contained in:
Huy
2022-05-25 12:07:38 -07:00
committed by GitHub
parent b57d6e1df4
commit 1fb2b2d70f
7 changed files with 38 additions and 4 deletions

View File

@@ -728,7 +728,7 @@ namespace ts.server.protocol {
}
// All we need is the `success` and `message` fields of Response.
export interface ApplyCodeActionCommandResponse extends Response {}
export interface ApplyCodeActionCommandResponse extends Response { }
export interface FileRangeRequestArgs extends FileRequestArgs {
/**
@@ -1067,7 +1067,7 @@ namespace ts.server.protocol {
readonly arguments: JsxClosingTagRequestArgs;
}
export interface JsxClosingTagRequestArgs extends FileLocationRequestArgs {}
export interface JsxClosingTagRequestArgs extends FileLocationRequestArgs { }
export interface JsxClosingTagResponse extends Response {
readonly body: TextInsertion;
@@ -2390,7 +2390,7 @@ namespace ts.server.protocol {
/**
* Human-readable description of the `source` from the CompletionEntry.
*/
sourceDisplay?: SymbolDisplayPart[];
sourceDisplay?: SymbolDisplayPart[];
}
/** @deprecated Prefer CompletionInfoResponse, which supports several top-level fields in addition to the array of entries. */
@@ -3415,7 +3415,7 @@ namespace ts.server.protocol {
/**
* Allows completions to be formatted with snippet text, indicated by `CompletionItem["isSnippet"]`.
*/
readonly includeCompletionsWithSnippetText?: boolean;
readonly includeCompletionsWithSnippetText?: boolean;
/**
* If enabled, the completion list will include completions with invalid identifier names.
* For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`.
@@ -3465,6 +3465,7 @@ namespace ts.server.protocol {
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
readonly includeInlayFunctionParameterTypeHints?: boolean,
readonly includeInlayVariableTypeHints?: boolean;
readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean;
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
readonly includeInlayEnumMemberValueHints?: boolean;