* Normalize type references before relating them in isRelatedTo * Add comments * Accept new baselines * Add regression tests * Accept new baselines * Use aliases when available in error reporting * Accept new baselines
26 lines
412 B
TypeScript
26 lines
412 B
TypeScript
// @strict: true
|
|
|
|
// Repros from #33872
|
|
|
|
export interface CalcObj<O> {
|
|
read: (origin: O) => CalcValue<O>;
|
|
}
|
|
|
|
export type CalcValue<O> = CalcObj<O>;
|
|
|
|
function foo<O>() {
|
|
const unk: CalcObj<unknown> = { read: (origin: unknown) => unk }
|
|
const x: CalcObj<O> = unk;
|
|
}
|
|
|
|
type A<T> = B<T>;
|
|
|
|
interface B<T> {
|
|
prop: A<T>;
|
|
}
|
|
|
|
declare let a: A<number>;
|
|
declare let b: A<3>;
|
|
|
|
b = a;
|