forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes the third part of microsoft#5453, needed to effectively type `bind` (Function.prototype), `curry` and `compose`. Depends on microsoft#17961 type calls, microsoft#17884 type spread and microsoft#18004 tuple spread. The first 2/3 are included, so changes will look more cluttered here though new changes just span 10 lines over 2 functions. Will properly test this when those are ready -- now still broken.
- Loading branch information
1 parent
c274d9b
commit bbcd11e
Showing
5 changed files
with
30 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
tests/cases/compiler/typeCallSpreads.ts(2,13): error TS1005: ')' expected. | ||
tests/cases/compiler/typeCallSpreads.ts(2,19): error TS1005: ';' expected. | ||
|
||
|
||
==== tests/cases/compiler/typeCallSpreads.ts (2 errors) ==== | ||
type Fn = <T>(v: T) => T; | ||
type a = Fn(...[1]); | ||
~~~ | ||
!!! error TS1005: ')' expected. | ||
~ | ||
!!! error TS1005: ';' expected. | ||
|
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 @@ | ||
//// [typeCallSpreads.ts] | ||
type Fn = <T>(v: T) => T; | ||
type a = Fn(...[1]); | ||
|
||
|
||
//// [typeCallSpreads.js] | ||
[1]; | ||
; |
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,2 @@ | ||
type Fn = <T>(v: T) => T; | ||
type a = Fn(...[1]); |