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 6fbd2a5 commit ba8310aCopy full SHA for ba8310a
tests/cases/compiler/narrowingOfDottedNames.ts
@@ -1,11 +1,13 @@
1
+// @strict: true
2
+
3
// Repro from #8383
4
5
class A {
- prop: { a: string; };
6
+ prop!: { a: string; };
7
}
8
9
class B {
- prop: { b: string; }
10
+ prop!: { b: string; }
11
12
13
function isA(x: any): x is A {
@@ -37,3 +39,21 @@ function f2(x: A | B) {
37
39
38
40
41
42
43
+// Repro from #28100
44
45
+class Foo1
46
+{
47
+ x: number; // Error
48
+ constructor() {
49
+ if (this instanceof Boolean) {
50
+ }
51
52
+}
53
54
+class Foo2
55
56
57
58
59
0 commit comments