// @strict: true // Repro from #19746 const wat: Runtype = Num; const Foo = Obj({ foo: Num }) interface Runtype { constraint: Constraint witness: A } interface Num extends Runtype { tag: 'number' } declare const Num: Num interface Obj }> extends Runtype<{[K in keyof O]: O[K]['witness'] }> {} declare function Obj }>(fields: O): Obj; interface Constraint> extends Runtype { underlying: A, check: (x: A['witness']) => void, }