You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't want to define a type for both in interface and in class as we work with complex nested generic types
we want to see the error during coding, not at compile time
🙁
Current behavior:
interface A {
method(param: string): void;
}
class B implements A {
method(param): void {
// the type of param is any
console.log(param);
}
}
const b = new B();
b.method(1); // -> no error
```
🙂
Expected behavior:
interface A {
method(param: string): void;
}
class B implements A {
method(param): void {
// should be type error for param
console.log(param);
}
}
const b = new B();
b.method(1); // -> should be type error
The text was updated successfully, but these errors were encountered:
###
We don't want to define a type for both in interface and in class as we work with complex nested generic types
we want to see the error during coding, not at compile time
🙁
Current behavior:
```
🙂
Expected behavior:
The text was updated successfully, but these errors were encountered: