interface Check {
name: string;
_meth(): void;
}
class ClassDemo implements Check {
name: string = 'something';
_meth() {
return 'string';
}
}
Upon examining the interface, it is evident that the return type for _meth should be void. However, TypeScript is not flagging an error for the class implementation; instead, it is applying type inference. While void typically signifies a return of "void," this behavior is still new to me as a TypeScript learner. I would greatly appreciate an explanation for this discrepancy.