* Move anonymous type instantiation cache from AST node to root type * Use "root" type reference as cache location for deferred type references * Add test Co-authored-by: Andrew Branch <andrew@wheream.io>
22 lines
315 B
TypeScript
22 lines
315 B
TypeScript
// @strictFunctionTypes: true
|
|
|
|
// #40995
|
|
|
|
interface Success {
|
|
isSuccess: true;
|
|
}
|
|
|
|
interface Fail {
|
|
isSuccess: false;
|
|
}
|
|
|
|
type Item = Success | Fail;
|
|
|
|
function f1(a: Item[]) {
|
|
a.map(item => ({ ...item })).filter(value => {});
|
|
}
|
|
|
|
function f2<T>(a: Item[]) {
|
|
a.map(item => ({ ...item })).filter(value => {});
|
|
}
|