-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
Description
Please check the following code:
class BaseClass {
}
const checkIfCorrectClass___WORKS = (classToCheck: Class<BaseClass>):boolean => {
return classToCheck.prototype instanceof BaseClass;
};
const checkIfCorrectClass___DOES_NOT_WORK = (classToCheck: Class<BaseClass>): void => {
if (classToCheck.prototype instanceof BaseClass) {
return;
}
throw Error(`Invalid class received.`);
};
Here's the snippet:
Could this be a bug maybe?
Reactions are currently unavailable
