Add breaking change repros
This commit is contained in:
parent
fffd77457a
commit
c58157573e
1 changed files with 10 additions and 0 deletions
|
@ -172,3 +172,13 @@ const f1: F = () => {
|
|||
}
|
||||
]);
|
||||
};
|
||||
|
||||
// Breaking change repros from #29478
|
||||
|
||||
declare function foldLeft<U>(z: U, f: (acc: U, t: boolean) => U): U;
|
||||
let res: boolean = foldLeft(true, (acc, t) => acc && t); // Error
|
||||
|
||||
enum State { A, B }
|
||||
type Foo = { state: State }
|
||||
declare function bar<T>(f: () => T[]): T[];
|
||||
let x: Foo[] = bar(() => !!true ? [{ state: State.A }] : [{ state: State.B }]); // Error
|
||||
|
|
Loading…
Reference in a new issue