Consider the following scenario with two classes:
abstract class Configuration {
abstract setName(name: string);
}
class MyConfiguration extends Configuration {
setName(name) {
// set name.
}
}
In this setup, the name
parameter in MyConfiguration
is of type any
. This raises a question about the purpose of typing abstract functions if their types do not propagate down to inheriting classes. Is there a way to enforce typing without directly modifying the MyConfiguration
class? The goal is to create a configuration for a third-party tool without requiring end-users to manually type abstract function parameters, although it is recommended.
Any ideas or suggestions on how to achieve this?