File tree 4 files changed +26
-15
lines changed 4 files changed +26
-15
lines changed Original file line number Diff line number Diff line change @@ -23638,6 +23638,8 @@ namespace ts {
23638
23638
return objectType && getPropertyOfType(objectType, escapeLeadingUnderscores((node as StringLiteral | NumericLiteral).text));
23639
23639
23640
23640
case SyntaxKind.DefaultKeyword:
23641
+ case SyntaxKind.FunctionKeyword:
23642
+ case SyntaxKind.EqualsGreaterThanToken:
23641
23643
return getSymbolOfNode(node.parent);
23642
23644
23643
23645
default:
Original file line number Diff line number Diff line change @@ -489,8 +489,10 @@ namespace ts.SymbolDisplay {
489
489
addNewLineIfDisplayPartsExist ( ) ;
490
490
if ( symbolKind ) {
491
491
pushTypePart ( symbolKind ) ;
492
- displayParts . push ( spacePart ( ) ) ;
493
- addFullSymbolName ( symbol ) ;
492
+ if ( ! some ( symbol . declarations , d => isArrowFunction ( d ) || ( isFunctionExpression ( d ) || isClassExpression ( d ) ) && ! d . name ) ) {
493
+ displayParts . push ( spacePart ( ) ) ;
494
+ addFullSymbolName ( symbol ) ;
495
+ }
494
496
}
495
497
}
496
498
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts'/>
2
+
3
+ ////[1].forEach(fu/*1*/nction() {});
4
+ ////[1].map(x =/*2*/> x + 1);
5
+
6
+ verify . quickInfoAt ( "1" , "(local function)(): void" ) ;
7
+ verify . quickInfoAt ( "2" , "function(x: number): number" ) ;
Original file line number Diff line number Diff line change 1
1
/// <reference path='fourslash.ts' />
2
2
3
3
4
- ////inter/*invlaid1 */face IFoo {
4
+ ////inter/*invalid1 */face IFoo {
5
5
//// new(): IFoo;
6
6
//// [indexer: string]: number;
7
7
//// method(value: number): string;
8
8
//// property: string;
9
- /////*invlaid2 */ }
9
+ /////*invalid2 */ }
10
10
////
11
- ////cl/*invlaid3 */ass bar imple/*invlaid4 */ments IFoo {
12
- //// constructor( /*invlaid5 */ ) {
11
+ ////cl/*invalid3 */ass bar imple/*invalid4 */ments IFoo {
12
+ //// constructor( /*invalid5 */ ) {
13
13
////
14
14
//// }
15
15
////
16
- //// pu/*invlaid6 */blic method(value: string): string {
17
- //// retu/*invlaid7 */rn null;
16
+ //// pu/*invalid6 */blic method(value: string): string {
17
+ //// retu/*invalid7 */rn null;
18
18
//// }
19
19
////
20
- //// public property: string /*invlaid8 */= "string";
20
+ //// public property: string /*invalid8 */= "string";
21
21
////
22
- //// public ge/*invlaid9 */t value() {
22
+ //// public ge/*invalid9 */t value() {
23
23
//// return 0;
24
24
//// }
25
25
//// }
26
26
////
27
27
////
28
- ////mod/*invlaid10 */ule m1 {
29
- //// va/*invlaid11 */r varibale = 0;
28
+ ////mod/*invalid10 */ule m1 {
29
+ //// va/*invalid11 */r varibale = 0;
30
30
////
31
- //// func/*invlaid12*/tion foo(arg1: number) {
32
- //// ret/*invlaid13 */urn string;
31
+ //// function foo(arg1: number) {
32
+ //// ret/*invalid13 */urn string;
33
33
//// }
34
34
////
35
35
//// class foo {
40
40
//// value1: "string",
41
41
//// value2: {
42
42
//// value21: number
43
- //// /*invlaid14 */ }
43
+ //// /*invalid14 */ }
44
44
//// };
45
45
//// }
46
46
You can’t perform that action at this time.
0 commit comments