TS: Fix infinite type expansion issue

This commit is contained in:
Asger F
2019-03-07 18:42:06 +00:00
parent 69a048d102
commit dc6c33dd12
5 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
interface X {
a: RecursiveMappedType<this> & X;
b: boolean;
}
type RecursiveMappedType<V> = {
[P in keyof V]?: X & RecursiveMappedType<V[P]>
}

View File

@@ -0,0 +1,2 @@
| recursiveMappedType.ts:2:5:2:5 | a | RecursiveMappedType<this> & X |
| recursiveMappedType.ts:3:5:3:5 | b | boolean |

View File

@@ -0,0 +1,4 @@
import javascript
from Expr e
select e, e.getType()

View File

@@ -0,0 +1,3 @@
{
"include": ["."]
}