You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
410 B

const util = require('util');
const assert = require('assert');
class deprecatedClass {
}
const deprecated = util.deprecate(deprecatedClass, 'deprecatedClass is deprecated.');
class subclass extends deprecated {
constructor() {
super();
}
}
const instance = new subclass();
assert(instance instanceof subclass);
assert(instance instanceof deprecated);
assert(instance instanceof deprecatedClass);