-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
608 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
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
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,20 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// function foo (a: number, b: number) {} | ||
//// foo(/*a*/1, /*b*/2); | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: 'a:', | ||
position: markers[0].position, | ||
whitespaceAfter: true | ||
}, | ||
{ | ||
text: 'b:', | ||
position: markers[1].position, | ||
whitespaceAfter: true | ||
} | ||
], undefined, { | ||
includeInlineParameterName: true | ||
}); |
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,9 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// declare const unknownCall: any; | ||
//// unknownCall(); | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([], undefined, { | ||
includeInlineParameterName: true | ||
}); |
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,24 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// function foo(a: number) { | ||
//// return (b: number) => { | ||
//// return a + b | ||
//// } | ||
//// } | ||
//// foo(/*a*/1)(/*b*/2); | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: 'a:', | ||
position: markers[0].position, | ||
whitespaceAfter: true | ||
}, | ||
{ | ||
text: 'b:', | ||
position: markers[1].position, | ||
whitespaceAfter: true | ||
}, | ||
], undefined, { | ||
includeInlineParameterName: true | ||
}); |
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,23 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// function foo(a: (b: number) => number) { | ||
//// return a(/*a*/1) + 2 | ||
//// } | ||
|
||
//// foo(/*b*/(c: number) => c + 1); | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: 'b:', | ||
position: markers[0].position, | ||
whitespaceAfter: true | ||
}, | ||
{ | ||
text: 'a:', | ||
position: markers[1].position, | ||
whitespaceAfter: true | ||
}, | ||
], undefined, { | ||
includeInlineParameterName: true | ||
}); |
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,16 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// function foo (a: number, b: number) {} | ||
//// declare const a: 1; | ||
//// foo(a, /*b*/2); | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: 'b:', | ||
position: markers[0].position, | ||
whitespaceAfter: true | ||
}, | ||
], undefined, { | ||
includeInlineParameterName: true | ||
}); |
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,8 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// function foo (a: number, b: number) {} | ||
//// foo(1, 2); | ||
|
||
verify.getInlineHints([], undefined, { | ||
includeInlineParameterName: false | ||
}); |
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,14 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// const a/*a*/ = 123; | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: ':123', | ||
position: markers[0].position, | ||
whitespaceBefore: true | ||
}, | ||
], undefined, { | ||
includeInlineVariableType: true | ||
}); |
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,14 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// const a/*a*/ = 123; | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: ':123', | ||
position: markers[0].position, | ||
whitespaceBefore: true | ||
}, | ||
], undefined, { | ||
includeInlineVariableType: true | ||
}); |
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,14 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// const a/*a*/ = { a: 123 }; | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: ':{ a: number; }', | ||
position: markers[0].position, | ||
whitespaceBefore: true | ||
}, | ||
], undefined, { | ||
includeInlineVariableType: true | ||
}); |
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,15 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// class Class {} | ||
//// const a/*a*/ = new Class(); | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: ':Class', | ||
position: markers[0].position, | ||
whitespaceBefore: true | ||
}, | ||
], undefined, { | ||
includeInlineVariableType: true | ||
}); |
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,14 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// const a/*a*/ = () => 123; | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: ':() => number', | ||
position: markers[0].position, | ||
whitespaceBefore: true | ||
}, | ||
], undefined, { | ||
includeInlineVariableType: true | ||
}); |
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,15 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// function foo (a: number, { c }: any) {} | ||
//// foo(/*a*/1, { c: 1}); | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: 'a:', | ||
position: markers[0].position, | ||
whitespaceAfter: true | ||
} | ||
], undefined, { | ||
includeInlineParameterName: true | ||
}); |
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,7 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// const a = 123; | ||
|
||
verify.getInlineHints([], undefined, { | ||
includeInlineVariableType: false | ||
}); |
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,7 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// const a; | ||
|
||
verify.getInlineHints([], undefined, { | ||
includeInlineVariableType: true | ||
}); |
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,14 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// const a/*a*/ = "I'm very very very very very very very very very long"; | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: `:"I'm very very very very ve...`, | ||
position: markers[0].position, | ||
whitespaceBefore: true | ||
}, | ||
], undefined, { | ||
includeInlineVariableType: true | ||
}); |
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,15 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// function foo (Im_very_very_very_very_very_very_very_long: number) {} | ||
//// foo(/*a*/1); | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: 'Im_very_very_very_very_very...:', | ||
position: markers[0].position, | ||
whitespaceAfter: true | ||
} | ||
], undefined, { | ||
includeInlineParameterName: true | ||
}); |
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,20 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// type F = (a: string, b: number) => void | ||
//// const f: F = (a/*a*/, b/*b*/) => { } | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: ':string', | ||
position: markers[0].position, | ||
whitespaceBefore: true | ||
}, | ||
{ | ||
text: ':number', | ||
position: markers[1].position, | ||
whitespaceBefore: true | ||
} | ||
], undefined, { | ||
includeInlineFunctionParameterType: true | ||
}); |
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,15 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// function foo (cb: (a: string) => void) {} | ||
//// foo((a/*a*/) => { }) | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: ':string', | ||
position: markers[0].position, | ||
whitespaceBefore: true | ||
} | ||
], undefined, { | ||
includeInlineFunctionParameterType: true | ||
}); |
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,15 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// function foo (cb: (a: Exclude<1 | 2 | 3, 1>) => void) {} | ||
//// foo((a/*a*/) => { }) | ||
|
||
const markers = test.markers(); | ||
verify.getInlineHints([ | ||
{ | ||
text: ':Exclude<1 | 2 | 3, 1>', | ||
position: markers[0].position, | ||
whitespaceBefore: true | ||
} | ||
], undefined, { | ||
includeInlineFunctionParameterType: true | ||
}); |
Oops, something went wrong.