forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick PR microsoft#54588 into release-5.1
Component commits: 8e1f8b6 Fixed a regression with string completions not being available directly in arguments typed using rest parameter
- Loading branch information
1 parent
e6ceba0
commit 1e896e5
Showing
2 changed files
with
10 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
9 changes: 9 additions & 0 deletions
9
tests/cases/fourslash/completionsLiteralDirectlyInRestConstrainedToArrayType.ts
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" /> | ||
// @strict: true | ||
//// | ||
//// function fn<T extends ('value1' | 'value2' | 'value3')[]>(...values: T): T { return values; } | ||
//// | ||
//// const value1 = fn('/*1*/'); | ||
//// const value2 = fn('value1', '/*2*/'); | ||
|
||
verify.completions({ marker: ["1", "2"], includes: [`value1`, `value2`, `value3`] }) |