TypeScript/tests/cases/compiler/quickIntersectionCheckCorrectlyCachesErrors.ts
Nathan Shively-Sanders 8ca36f3516
someTypeRelatedToType now passes isIntersectionConstituent (#33213)
* someTypeRelatedToType now passes isIntersectionConstituent

* Fix [][] lint
2019-09-04 13:36:50 -07:00

16 lines
424 B
TypeScript

// @jsx: react
// @filename: quickIntersectionCheckCorrectlyCachesErrors.tsx
interface F<P> {
(props: P & { children?: boolean }): void;
propTypes: { [K in keyof P]: null extends P ? K : K };
}
declare function g(C: F<unknown>): string;
export function wu<CP extends { o: object }>(CC: F<CP>) {
class WU {
m() {
g(CC)
return <CC {...(null as unknown as CP)} />;
}
}
}