Fix a mistake in "Type Checking JavaScript Files". PR836
This commit is contained in:
parent
7eb096143c
commit
e375a563c5
@ -44,10 +44,10 @@ class C {
|
||||
method() {
|
||||
this.constructorOnly = false // error, constructorOnly is a number
|
||||
this.constructorUnknown = "plunkbat" // ok, constructorUnknown is string | undefined
|
||||
this.methodOnly = 'ok' // ok, but y could also be undefined
|
||||
this.methodOnly = 'ok' // ok, but methodOnly could also be undefined
|
||||
}
|
||||
method2() {
|
||||
this.methodOnly = true // also, ok, y's type is string | boolean | undefined
|
||||
this.methodOnly = true // also, ok, methodOnly's type is string | boolean | undefined
|
||||
}
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user