Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add tests for
infer
with constraint
- Loading branch information
1 parent
bb58424
commit ee82630
Showing
4 changed files
with
4,147 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/shared-fixtures/fixtures/typescript/types/conditional-infer-with-constraint.src.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,5 @@ | ||
type X3<T> = T extends [infer U extends number] ? MustBeNumber<U> : never; | ||
type X4<T> = T extends [infer U extends number, infer U extends number] ? MustBeNumber<U> : never; | ||
type X5<T> = T extends [infer U extends number, infer U] ? MustBeNumber<U> : never; | ||
type X6<T> = T extends [infer U, infer U extends number] ? MustBeNumber<U> : never; | ||
type X7<T> = T extends [infer U extends string, infer U extends number] ? U : never; |
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
Oops, something went wrong.