1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| // Equally specific inputs and outputs — Good
class SubClass extends BaseClass {
method(value: City): City { ... }
}
// More specific outputs — Good
class SubClass extends BaseClass {
method(value: City): SanFrancisco { ... }
}
// Less specific inputs — Good
class SubClass extends BaseClass {
method(value: Noun): City { ... }
}
|