Skip to content

Commit 7f4d1ac

Browse files
committed
Add regression test
1 parent 93b4302 commit 7f4d1ac

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/cases/compiler/destructuringInitializerContextualTypeFromContext.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @strict: true
2+
13
interface SFC<P = {}> {
24
(props: P & { children?: any }): any | null;
35
}
@@ -16,4 +18,9 @@ const Child: SFC<Props> = ({
1618
children,
1719
name = "Artemis",
1820
...props
19-
}) => `name: ${name} props: ${JSON.stringify(props)}`;
21+
}) => `name: ${name} props: ${JSON.stringify(props)}`;
22+
23+
// Repro from #29189
24+
25+
declare function f(g: (as: string[]) => void): void
26+
f(([_1, _2 = undefined]) => undefined)

0 commit comments

Comments
 (0)