In the following statement,
for (let subscription in this._subscriptions) {
// Do something with subscription
}
The variable subscription is considered type any. Although I'm compiling with noImplicitAny as true, no error is given. Based on the for spec, it seems as if subscription should implicitly be considered string.
Because of this, it's possible to compile with typo functions that will cause errors at runtime.
In the following statement,
The variable
subscriptionis considered typeany. Although I'm compiling withnoImplicitAnyas true, no error is given. Based on the for spec, it seems as ifsubscriptionshould implicitly be consideredstring.Because of this, it's possible to compile with typo functions that will cause errors at runtime.