Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid provide hints for binding patterns (#44961)
* Avoid provide hints for binding patterns * Rename as 56
- Loading branch information
Showing
2 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// const object/*a*/ = { foo: 1, bar: 2 } | ||
//// const array/*b*/ = [1, 2] | ||
//// const a/*c*/ = object; | ||
//// const { foo, bar } = object; | ||
//// const {} = object; | ||
//// const b/*d*/ = array; | ||
//// const [ first, second ] = array; | ||
//// const [] = array; | ||
|
||
const markers = test.markers(); | ||
verify.getInlayHints([ | ||
{ | ||
text: ': { foo: number; bar: number; }', | ||
position: markers[0].position, | ||
kind: ts.InlayHintKind.Type, | ||
whitespaceBefore: true | ||
}, | ||
{ | ||
text: ': number[]', | ||
position: markers[1].position, | ||
kind: ts.InlayHintKind.Type, | ||
whitespaceBefore: true | ||
}, | ||
{ | ||
text: ': { foo: number; bar: number; }', | ||
position: markers[2].position, | ||
kind: ts.InlayHintKind.Type, | ||
whitespaceBefore: true | ||
}, | ||
{ | ||
text: ': number[]', | ||
position: markers[3].position, | ||
kind: ts.InlayHintKind.Type, | ||
whitespaceBefore: true | ||
} | ||
], undefined, { | ||
includeInlayVariableTypeHints: true | ||
}); |