TypeScript/tests/cases/compiler/intersectionOfTypeVariableHasApparentSignatures.ts
Wesley Wigham 99d6b0d308
Actually get the apparent type of intersection members when calculating intersection apparent types (#21133)
* Actually get the apparent type of intersection members when calculating intersection apparent types

* Add nonjsx variant

* Fix nit
2018-01-17 15:20:09 -08:00

17 lines
336 B
TypeScript

// @strictNullChecks: true
// @noImplicitAny: true
interface Component<P> {
props: Readonly<P> & Readonly<{ children?: {} }>;
}
interface Props {
children?: (items: {x: number}) => void
}
declare function f<T extends Props>(i: Component<T>): void;
f({
props: {
children: (({ x }) => { })
}
});