Add regression test

This commit is contained in:
Anders Hejlsberg
2018-03-23 09:48:00 -07:00
parent deb87bb8ad
commit 1c2f3d228c

View File

@@ -0,0 +1,12 @@
// @strict: true
// Repro from #22823
interface Props {
foo?: boolean;
}
function foo<P extends Props>(props: Readonly<P>) {
let { foo = false } = props;
if (foo === true) { }
}