We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15c6022 commit 34ec895Copy full SHA for 34ec895
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts
@@ -527,3 +527,30 @@ class Form<T> {
527
this.childFormFactories[prop](value)
528
}
529
530
+
531
+// Repro from #13787
532
533
+class SampleClass<P> {
534
+ public props: Readonly<P>;
535
+ constructor(props: P) {
536
+ this.props = Object.freeze(props);
537
+ }
538
+}
539
540
+interface Foo {
541
+ foo: string;
542
543
544
+declare function merge<T, U>(obj1: T, obj2: U): T & U;
545
546
+class AnotherSampleClass<T> extends SampleClass<T & Foo> {
547
+ constructor(props: T) {
548
+ const foo: Foo = { foo: "bar" };
549
+ super(merge(props, foo));
550
551
552
+ public brokenMethod() {
553
+ this.props.foo.concat;
554
555
556
+new AnotherSampleClass({});
0 commit comments